X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=load.php;h=c832237059948450919f8cd895c75e176ae3defb;hb=b563ca96845c935d2ca734381c71e4dfb5cd9370;hp=d30a34836ce9b0e1b2ef983960618432242ee652;hpb=1e24e6cddf5601f6106261e10207b6f7d1ca31f3;p=lhc%2Fweb%2Fwiklou.git diff --git a/load.php b/load.php index d30a34836c..c832237059 100644 --- a/load.php +++ b/load.php @@ -25,9 +25,8 @@ use MediaWiki\Logger\LoggerFactory; // This endpoint is supposed to be independent of request cookies and other -// details of the session. Log warnings for violations of the no-session -// constraint. -define( 'MW_NO_SESSION', 'warn' ); +// details of the session. Enforce this constraint with respect to session use. +define( 'MW_NO_SESSION', 1 ); require __DIR__ . '/includes/WebStart.php'; @@ -36,12 +35,15 @@ if ( !$wgRequest->checkUrlExtension() ) { return; } -// Respond to ResourceLoader request +// Set up ResourceLoader $resourceLoader = new ResourceLoader( ConfigFactory::getDefaultInstance()->makeConfig( 'main' ), LoggerFactory::getInstance( 'resourceloader' ) ); -$resourceLoader->respond( new ResourceLoaderContext( $resourceLoader, $wgRequest ) ); +$context = new ResourceLoaderContext( $resourceLoader, $wgRequest ); + +// Respond to ResourceLoader request +$resourceLoader->respond( $context ); Profiler::instance()->setTemplated( true );