jobqueue changes
[lhc/web/wiklou.git] / maintenance / getSlaveServer.php
index d148557..2525826 100644 (file)
@@ -1,11 +1,19 @@
 <?php
 /**
+ * This script reports the hostname of a slave server.
+ *
  * @file
  * @ingroup Maintenance
  */
 
 require_once( dirname(__FILE__).'/commandLine.inc' );
 
+if ( $wgAllDBsAreLocalhost ) {
+       # Can't fool the backup script
+       print "localhost\n";
+       exit;
+}
+
 if( isset( $options['group'] ) ) {
        $db = wfGetDB( DB_SLAVE, $options['group'] );
        $host = $db->getServer();