]> scripts.mit.edu Git - autoinstalls/mediawiki.git/blobdiff - maintenance/getSlaveServer.php
MediaWiki 1.17.0
[autoinstalls/mediawiki.git] / maintenance / getSlaveServer.php
index eac97a591e66e91d9ca37d1f24c45fd1e40f6cb1..a9d93f1dc11a1785c1aa9cc664f19505b92c0b67 100644 (file)
@@ -19,8 +19,8 @@
  *
  * @ingroup Maintenance
  */
-require_once( dirname(__FILE__) . '/Maintenance.php' );
+
+require_once( dirname( __FILE__ ) . '/Maintenance.php' );
 
 class GetSlaveServer extends Maintenance {
        public function __construct() {
@@ -30,11 +30,11 @@ class GetSlaveServer extends Maintenance {
        }
        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();
@@ -47,4 +47,4 @@ class GetSlaveServer extends Maintenance {
 }
 
 $maintClass = "GetSlaveServer";
-require_once( DO_MAINTENANCE );
+require_once( RUN_MAINTENANCE_IF_MAIN );