Merge "Make DBAccessBase use DBConnRef, rename $wiki, and hide getLoadBalancer()"
[lhc/web/wiklou.git] / maintenance / storage / orphanStats.php
index 3866be7..6a04b98 100644 (file)
@@ -38,11 +38,11 @@ class OrphanStats extends Maintenance {
                        "Show some statistics on the blob_orphans table, created with trackBlobs.php" );
        }
 
-       protected function &getDB( $cluster, $groups = [], $wiki = false ) {
+       protected function getDB( $cluster, $groups = [], $wiki = false ) {
                $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
                $lb = $lbFactory->getExternalLB( $cluster );
 
-               return $lb->getConnection( DB_REPLICA );
+               return $lb->getMaintenanceConnectionRef( DB_REPLICA );
        }
 
        public function execute() {