Follow-up r57991: Message not longer to ignore for translatewiki
[lhc/web/wiklou.git] / mwScriptLoader.php
index 8637cc8..c884127 100644 (file)
@@ -30,8 +30,9 @@ require_once('includes/WebStart.php');
 wfProfileIn( 'mwScriptLoader.php' );
 
 
-if( strpos( wfGetScriptUrl(), "mwScriptLoader{$wgScriptExtension}" ) === false ){
+if( $wgRequest->isPathInfoBad() ){
        wfHttpError( 403, 'Forbidden',
+               'Invalid file extension found in PATH_INFO. ' . 
                'mwScriptLoader must be accessed through the primary script entry point.' );
        return;
 }
@@ -51,4 +52,4 @@ if ( !$wgEnableScriptLoader ) {
 $myScriptLoader = new jsScriptLoader();
 $myScriptLoader->doScriptLoader();
 
-wfProfileOut( 'mwScriptLoader.php' );
\ No newline at end of file
+wfProfileOut( 'mwScriptLoader.php' );