summaryrefslogtreecommitdiff
path: root/api.php
diff options
context:
space:
mode:
Diffstat (limited to 'api.php')
-rw-r--r--api.php17
1 files changed, 3 insertions, 14 deletions
diff --git a/api.php b/api.php
index 615c71ca..af7c4525 100644
--- a/api.php
+++ b/api.php
@@ -73,7 +73,7 @@ try {
$processor = new ApiMain( RequestContext::getMain(), $wgEnableWriteAPI );
// Last chance hook before executing the API
- wfRunHooks( 'ApiBeforeMain', array( &$processor ) );
+ Hooks::run( 'ApiBeforeMain', array( &$processor ) );
if ( !$processor instanceof ApiMain ) {
throw new MWException( 'ApiBeforeMain hook set $processor to a non-ApiMain class' );
}
@@ -88,18 +88,9 @@ if ( $processor ) {
$processor->execute();
}
-if ( function_exists( 'fastcgi_finish_request' ) ) {
- fastcgi_finish_request();
-}
-
-// Execute any deferred updates
-DeferredUpdates::doUpdates();
-
// Log what the user did, for book-keeping purposes.
$endtime = microtime( true );
-wfLogProfilingData();
-
// Log the request
if ( $wgAPIRequestLog ) {
$items = array(
@@ -128,7 +119,5 @@ if ( $wgAPIRequestLog ) {
wfDebug( "Logged API request to $wgAPIRequestLog\n" );
}
-// Shut down the database. foo()->bar() syntax is not supported in PHP4: we won't ever actually
-// get here to worry about whether this should be = or =&, but the file has to parse properly.
-$lb = wfGetLBFactory();
-$lb->shutdown();
+$mediawiki = new MediaWiki();
+$mediawiki->doPostOutputShutdown( 'fast' );