Minor logic error on removing blocks on range when tweaking an IP.
[mediawiki.git] / maintenance / getSlaveServer.php
blob97104e08a3b1231d7a6b55242231c27118c89ffe
1 <?php
2 /**
3 * @file
4 * @ingroup Maintenance
5 */
7 require_once( dirname(__FILE__).'/commandLine.inc' );
9 if ( $wgAllDBsAreLocalhost ) {
10 # Can't fool the backup script
11 print "localhost\n";
12 exit;
15 if( isset( $options['group'] ) ) {
16 $db = wfGetDB( DB_SLAVE, $options['group'] );
17 $host = $db->getServer();
18 } else {
19 $lb = wfGetLB();
20 $i = $lb->getReaderIndex();
21 $host = $lb->getServerName( $i );
24 print "$host\n";