X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=api.php;h=83c1373c14a97b645ad1d7948e1b774ded6806d0;hb=50c52563528ba3d765c3762211f98d6f3c0e39fd;hp=a9e56830f3cdec76980f4762e825a4df94fe4728;hpb=4760e057bb2f4db09ca395ec43d0172c92a42e19;p=lhc%2Fweb%2Fwiklou.git diff --git a/api.php b/api.php index a9e56830f3..83c1373c14 100644 --- a/api.php +++ b/api.php @@ -35,11 +35,6 @@ use MediaWiki\Logger\LegacyLogger; // So extensions (and other code) can check whether they're running in API mode define( 'MW_API', true ); -// Bail on old versions of PHP, or if composer has not been run yet to install -// dependencies. Using dirname( __FILE__ ) here because __DIR__ is PHP5.3+. -require_once dirname( __FILE__ ) . '/includes/PHPVersionCheck.php'; -wfEntryPointCheck( 'api.php' ); - require __DIR__ . '/includes/WebStart.php'; $starttime = microtime( true ); @@ -88,20 +83,9 @@ if ( $processor ) { $processor->execute(); } -if ( function_exists( 'fastcgi_finish_request' ) ) { - fastcgi_finish_request(); -} - -JobQueueGroup::pushLazyJobs(); - -// 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( @@ -130,7 +114,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' );