X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FgetReplicaServer.php;h=7e9104cceacad26a2c503329e819c2c8946bfbcb;hb=75e1edeacd5c976354ecac4e8056716fb82569e4;hp=c0c628494e071af54cdbcb76676266df7396a750;hpb=c004cfc116eb8c677c346f3db561fc3593a8fd99;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/getReplicaServer.php b/maintenance/getReplicaServer.php index c0c628494e..7e9104ccea 100644 --- a/maintenance/getReplicaServer.php +++ b/maintenance/getReplicaServer.php @@ -30,7 +30,7 @@ use MediaWiki\MediaWikiServices; * * @ingroup Maintenance */ -class GetSlaveServer extends Maintenance { +class GetReplicaServer extends Maintenance { public function __construct() { parent::__construct(); $this->addOption( "group", "Query group to check specifically" ); @@ -38,10 +38,7 @@ class GetSlaveServer extends Maintenance { } public function execute() { - global $wgAllDBsAreLocalhost; - if ( $wgAllDBsAreLocalhost ) { - $host = 'localhost'; - } elseif ( $this->hasOption( 'group' ) ) { + if ( $this->hasOption( 'group' ) ) { $db = $this->getDB( DB_REPLICA, $this->getOption( 'group' ) ); $host = $db->getServer(); } else { @@ -53,5 +50,5 @@ class GetSlaveServer extends Maintenance { } } -$maintClass = GetSlaveServer::class; +$maintClass = GetReplicaServer::class; require_once RUN_MAINTENANCE_IF_MAIN;