* Introduced LBFactory -- an abstract class for configuring database load balancers...
[lhc/web/wiklou.git] / maintenance / getSlaveServer.php
1 <?php
2
3 require_once( dirname(__FILE__).'/commandLine.inc' );
4
5 if( isset( $options['group'] ) ) {
6 $db = wfGetDB( DB_SLAVE, $options['group'] );
7 $host = $db->getServer();
8 } else {
9 $lb = wfGetLB();
10 $i = $lb->getReaderIndex();
11 $host = $lb->getServerName( $i );
12 }
13
14 print "$host\n";
15
16