X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=load.php;h=3f0c3df2938a3b9124a057f299c8ab8754fcd1e5;hp=1997fe73fcdd0852d0cbc2ccc71c162b322b136b;hb=0eb97872a54229f5c9892a1202882997a50d7e37;hpb=967a96e7fa5910f8fc451590decb381dbfb481ba diff --git a/load.php b/load.php index 1997fe73fc..3f0c3df293 100644 --- a/load.php +++ b/load.php @@ -22,13 +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 @@ -40,17 +41,13 @@ if ( !$wgRequest->checkUrlExtension() ) { // writes when getting database connections for ResourceLoader. (T192611) MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->disableChronologyProtection(); -// Set up ResourceLoader -$resourceLoader = new ResourceLoader( - ConfigFactory::getDefaultInstance()->makeConfig( 'main' ), - LoggerFactory::getInstance( 'resourceloader' ) -); +$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' );