dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Add 'Greek extended' group to special characters"
[lhc/web/wiklou.git]
/
load.php
diff --git
a/load.php
b/load.php
index
1d6a242
..
2b97f7a
100644
(file)
--- a/
load.php
+++ b/
load.php
@@
-24,6
+24,11
@@
use MediaWiki\Logger\LoggerFactory;
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' );
+
require __DIR__ . '/includes/WebStart.php';
// URL safety checks
require __DIR__ . '/includes/WebStart.php';
// URL safety checks
@@
-31,14
+36,15
@@
if ( !$wgRequest->checkUrlExtension() ) {
return;
}
return;
}
-// Respond to resource loading request.
-// foo()->bar() syntax is not supported in PHP4, and this file needs to *parse* in PHP4.
-$configFactory = ConfigFactory::getDefaultInstance();
+// Set up ResourceLoader
$resourceLoader = new ResourceLoader(
$resourceLoader = new ResourceLoader(
-
$configFactory
->makeConfig( 'main' ),
+
ConfigFactory::getDefaultInstance()
->makeConfig( 'main' ),
LoggerFactory::getInstance( 'resourceloader' )
);
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 );
Profiler::instance()->setTemplated( true );