Merge "build: Lower default Karma logLevel during local development"
[lhc/web/wiklou.git] / includes / api / ApiMain.php
index a9fe258..d2c957d 100644 (file)
@@ -281,7 +281,10 @@ class ApiMain extends ApiBase {
                }
                $this->mResult->setErrorFormatter( $this->getErrorFormatter() );
 
-               $this->mModuleMgr = new ApiModuleManager( $this );
+               $this->mModuleMgr = new ApiModuleManager(
+                       $this,
+                       MediaWikiServices::getInstance()->getObjectFactory()
+               );
                $this->mModuleMgr->addModules( self::$Modules, 'action' );
                $this->mModuleMgr->addModules( $config->get( 'APIModules' ), 'action' );
                $this->mModuleMgr->addModules( self::$Formats, 'format' );
@@ -293,7 +296,6 @@ class ApiMain extends ApiBase {
                $this->mEnableWrite = $enableWrite;
 
                $this->mCdnMaxAge = -1; // flag for executeActionWithErrorHandling()
-               $this->mCommit = false;
        }
 
        /**
@@ -1152,8 +1154,7 @@ class ApiMain extends ApiBase {
                }
 
                if ( $this->getParameter( 'curtimestamp' ) ) {
-                       $result->addValue( null, 'curtimestamp', wfTimestamp( TS_ISO_8601, time() ),
-                               ApiResult::NO_SIZE_CHECK );
+                       $result->addValue( null, 'curtimestamp', wfTimestamp( TS_ISO_8601 ), ApiResult::NO_SIZE_CHECK );
                }
 
                if ( $this->getParameter( 'responselanginfo' ) ) {