X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=load.php;h=3f0c3df2938a3b9124a057f299c8ab8754fcd1e5;hb=64676b52cc551ec3af9c0b8983027e8aa1d0462a;hp=c832237059948450919f8cd895c75e176ae3defb;hpb=500889f19005b4aed93c5b6eaafd35689fce7dcd;p=lhc%2Fweb%2Fwiklou.git diff --git a/load.php b/load.php index c832237059..3f0c3df293 100644 --- a/load.php +++ b/load.php @@ -22,12 +22,14 @@ * @author Trevor Parscal */ -use MediaWiki\Logger\LoggerFactory; +use MediaWiki\MediaWikiServices; // This endpoint is supposed to be independent of request cookies and other // details of the session. Enforce this constraint with respect to session use. define( 'MW_NO_SESSION', 1 ); +define( 'MW_ENTRY_POINT', 'load' ); + require __DIR__ . '/includes/WebStart.php'; // URL safety checks @@ -35,17 +37,17 @@ if ( !$wgRequest->checkUrlExtension() ) { return; } -// Set up ResourceLoader -$resourceLoader = new ResourceLoader( - ConfigFactory::getDefaultInstance()->makeConfig( 'main' ), - LoggerFactory::getInstance( 'resourceloader' ) -); +// Disable ChronologyProtector so that we don't wait for unrelated MediaWiki +// writes when getting database connections for ResourceLoader. (T192611) +MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->disableChronologyProtection(); + +$resourceLoader = MediaWikiServices::getInstance()->getResourceLoader(); $context = new ResourceLoaderContext( $resourceLoader, $wgRequest ); // Respond to ResourceLoader request $resourceLoader->respond( $context ); -Profiler::instance()->setTemplated( true ); +Profiler::instance()->setAllowOutput(); $mediawiki = new MediaWiki(); $mediawiki->doPostOutputShutdown( 'fast' );