Merge "Re add wpScrolltop id in EditPage"
[lhc/web/wiklou.git] / maintenance / storage / orphanStats.php
index 21f50f5..d7d0b84 100644 (file)
@@ -36,14 +36,14 @@ class OrphanStats extends Maintenance {
                        "Show some statistics on the blob_orphans table, created with trackBlobs.php" );
        }
 
-       protected function &getDB( $cluster, $groups = array(), $wiki = false ) {
+       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 );
                }
@@ -51,7 +51,7 @@ class OrphanStats extends Maintenance {
 
                $num = 0;
                $totalSize = 0;
-               $hashes = array();
+               $hashes = [];
                $maxSize = 0;
 
                foreach ( $res as $boRow ) {
@@ -59,7 +59,7 @@ class OrphanStats extends Maintenance {
                        $blobRow = $extDB->selectRow(
                                'blobs',
                                '*',
-                               array( 'blob_id' => $boRow->bo_blob_id ),
+                               [ 'blob_id' => $boRow->bo_blob_id ],
                                __METHOD__
                        );