X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=load.php;h=4c7208006fa01c1da15f1e9c0bb4105246138610;hb=f69779f53799b63d51169f0777091081c4be26ee;hp=9e18a5b54bc79369589b41e5977d0550d9f55a3f;hpb=32377424b9492bca276d6f8036ed297bef726ed3;p=lhc%2Fweb%2Fwiklou.git diff --git a/load.php b/load.php index 9e18a5b54b..4c7208006f 100644 --- a/load.php +++ b/load.php @@ -1,5 +1,7 @@ isPathInfoBad() ) { - wfHttpError( 403, 'Forbidden', - 'Invalid file extension found in PATH_INFO. ' . - 'The resource loader must be accessed through the primary script entry point.' ); +if ( !$wgRequest->checkUrlExtension() ) { return; - // FIXME: Doesn't this execute the rest of the request anyway? - // Was taken from api.php so I guess it's maybe OK but it doesn't look good. } // Respond to resource loading request -ResourceLoader::respond( new ResourceLoaderContext( $wgRequest, $wgServer . $wgScriptPath . '/load.php' ) ); +$resourceLoader = new ResourceLoader(); +$resourceLoader->respond( new ResourceLoaderContext( $resourceLoader, $wgRequest ) ); wfProfileOut( 'load.php' ); wfLogProfilingData(); -// Shut down the database -wfGetLBFactory()->shutdown(); \ No newline at end of file +// Shut down the database. foo()->bar() syntax is not supported in PHP4, and this file +// needs to *parse* in PHP4, although we'll never get down here to worry about = vs =& +$lb = wfGetLBFactory(); +$lb->shutdown();