*
* @ingroup Maintenance
*/
-class GetSlaveServer extends Maintenance {
+class GetReplicaServer extends Maintenance {
public function __construct() {
parent::__construct();
$this->addOption( "group", "Query group to check specifically" );
}
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 {
}
}
-$maintClass = GetSlaveServer::class;
+$maintClass = GetReplicaServer::class;
require_once RUN_MAINTENANCE_IF_MAIN;