maintenance/getReplicaServer.php: Remove reference to long-deleted config var
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 9 Sep 2019 14:22:43 +0000 (10:22 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Mon, 9 Sep 2019 14:25:38 +0000 (10:25 -0400)
$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

index d861348..7e9104c 100644 (file)
@@ -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 {