Merge "Create factory for MWHttpRequest"
[lhc/web/wiklou.git] / maintenance / storage / orphanStats.php
index d775830..4feb95e 100644 (file)
@@ -39,13 +39,13 @@ class OrphanStats extends Maintenance {
        protected function &getDB( $cluster, $groups = [], $wiki = false ) {
                $lb = wfGetLBFactory()->getExternalLB( $cluster );
 
-               return $lb->getConnection( DB_SLAVE );
+               return $lb->getConnection( DB_REPLICA );
        }
 
        public function execute() {
-               $dbr = $this->getDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_REPLICA );
                if ( !$dbr->tableExists( 'blob_orphans' ) ) {
-                       $this->error( "blob_orphans doesn't seem to exist, need to run trackBlobs.php first", true );
+                       $this->fatalError( "blob_orphans doesn't seem to exist, need to run trackBlobs.php first" );
                }
                $res = $dbr->select( 'blob_orphans', '*', false, __METHOD__ );
 
@@ -80,5 +80,5 @@ class OrphanStats extends Maintenance {
        }
 }
 
-$maintClass = "OrphanStats";
+$maintClass = OrphanStats::class;
 require_once RUN_MAINTENANCE_IF_MAIN;