OutputPage: Support UploadPath in testTransformResourcePath()
[lhc/web/wiklou.git] / maintenance / Maintenance.php
index c74cae2..62dc36c 100644 (file)
@@ -38,6 +38,7 @@ $maintClass = false;
 
 use MediaWiki\Logger\LoggerFactory;
 use MediaWiki\MediaWikiServices;
+use Wikimedia\Rdbms\LBFactory;
 
 /**
  * Abstract maintenance class for quickly writing and churning out
@@ -459,7 +460,6 @@ abstract class Maintenance {
         * Add the default parameters to the scripts
         */
        protected function addDefaultParams() {
-
                # Generic (non script dependant) options:
 
                $this->addOption( 'help', 'Display this help message', false, false, 'h' );
@@ -499,7 +499,7 @@ abstract class Maintenance {
         */
        public function getConfig() {
                if ( $this->config === null ) {
-                       $this->config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
+                       $this->config = MediaWikiServices::getInstance()->getMainConfig();
                }
 
                return $this->config;
@@ -546,7 +546,6 @@ abstract class Maintenance {
                                . "for this script to run: $joined. Please enable them and then try again.";
                        $this->error( $msg, 1 );
                }
-
        }
 
        /**