X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=maintenance%2FgetReplicaServer.php;h=7e9104cceacad26a2c503329e819c2c8946bfbcb;hb=48c448a94dd6d0555a3173ed60e19bd01e34a644;hp=c0c628494e071af54cdbcb76676266df7396a750;hpb=b0494b29097eaff97073f01e3427f2629eedadc1;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;