Merge "API DB commit and sticky DC cookie fixes"
[lhc/web/wiklou.git] / includes / api / ApiMain.php
index ca5e1bb..0d1314f 100644 (file)
@@ -434,6 +434,9 @@ class ApiMain extends ApiBase {
                // Log the request whether or not there was an error
                $this->logRequest( microtime( true ) - $t );
 
+               // Commit DBs and send any related cookies and headers
+               MediaWiki::preOutputCommit( $this->getContext() );
+
                // Send cache headers after any code which might generate an error, to
                // avoid sending public cache headers for errors.
                $this->sendCacheHeaders( $isError );