Get ConfigFactory & MainConfig from MediaWikiServices
[lhc/web/wiklou.git] / maintenance / Maintenance.php
index c74cae2..3925efe 100644 (file)
@@ -459,7 +459,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 +498,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 +545,6 @@ abstract class Maintenance {
                                . "for this script to run: $joined. Please enable them and then try again.";
                        $this->error( $msg, 1 );
                }
-
        }
 
        /**