From 3a39f364dc3f53fcad235eeb4f878fcec16be6e4 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Mon, 9 Sep 2019 10:22:43 -0400 Subject: [PATCH] maintenance/getReplicaServer.php: Remove reference to long-deleted config var $wgAllDBsAreLocalhost was removed 3 years ago, in I54b23654. This maintenance script kept working because it just saw null for the variable. But then Id67d0759 changed the code to access it via Config, which does checking for accessing of nonexistent config vars and so broke things. Bug: T232268 Change-Id: I4fc39cccfd9041c76f734a1a85c2b34fc84218f0 --- maintenance/getReplicaServer.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/maintenance/getReplicaServer.php b/maintenance/getReplicaServer.php index d861348dbd..7e9104ccea 100644 --- a/maintenance/getReplicaServer.php +++ b/maintenance/getReplicaServer.php @@ -38,9 +38,7 @@ class GetReplicaServer extends Maintenance { } public function execute() { - if ( $this->getConfig()->get( 'AllDBsAreLocalhost' ) ) { - $host = 'localhost'; - } elseif ( $this->hasOption( 'group' ) ) { + if ( $this->hasOption( 'group' ) ) { $db = $this->getDB( DB_REPLICA, $this->getOption( 'group' ) ); $host = $db->getServer(); } else { -- 2.20.1