* @ingroup Maintenance
*/
-require_once( dirname(__FILE__) . '/Maintenance.php' );
+require_once( dirname( __FILE__ ) . '/Maintenance.php' );
class GetSlaveServer extends Maintenance {
public function __construct() {
}
public function execute() {
global $wgAllDBsAreLocalhost;
- if( $wgAllDBsAreLocalhost ) {
+ if ( $wgAllDBsAreLocalhost ) {
$host = 'localhost';
} else {
- if( $this->hasOption('group') ) {
- $db = wfGetDB( DB_SLAVE, $this->getOption('group') );
+ if ( $this->hasOption( 'group' ) ) {
+ $db = wfGetDB( DB_SLAVE, $this->getOption( 'group' ) );
$host = $db->getServer();
} else {
$lb = wfGetLB();