"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 );
}
$num = 0;
$totalSize = 0;
- $hashes = array();
+ $hashes = [];
$maxSize = 0;
foreach ( $res as $boRow ) {
$blobRow = $extDB->selectRow(
'blobs',
'*',
- array( 'blob_id' => $boRow->bo_blob_id ),
+ [ 'blob_id' => $boRow->bo_blob_id ],
__METHOD__
);