Update wfGetDB calls in Maintenance scripts to use getDB()
[lhc/web/wiklou.git] / maintenance / getSlaveServer.php
index d618825..c858c38 100644 (file)
@@ -34,12 +34,13 @@ class GetSlaveServer extends Maintenance {
                $this->addOption( "group", "Query group to check specifically" );
                $this->mDescription = "Report the hostname of a slave server";
        }
+
        public function execute() {
                global $wgAllDBsAreLocalhost;
                if ( $wgAllDBsAreLocalhost ) {
                        $host = 'localhost';
                } elseif ( $this->hasOption( 'group' ) ) {
-                       $db = wfGetDB( DB_SLAVE, $this->getOption( 'group' ) );
+                       $db = $this->getDB( DB_SLAVE, $this->getOption( 'group' ) );
                        $host = $db->getServer();
                } else {
                        $lb = wfGetLB();