Localisation updates for core messages from translatewiki.net
[lhc/web/wiklou.git] / mwScriptLoader.php
index ea772fc..c884127 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * mvwScriptLoader.php
+ * mwScriptLoader.php
  * Script Loading Library for MediaWiki
  *
  * @file
 // include WebStart.php
 require_once('includes/WebStart.php');
 
-wfProfileIn( 'mvwScriptLoader.php' );
+wfProfileIn( 'mwScriptLoader.php' );
 
-if( isset( $_SERVER['SCRIPT_URL'] ) ) {
-       $url = $_SERVER['SCRIPT_URL'];
-} else {
-       $url = $_SERVER['PHP_SELF'];
-}
 
-if( strpos( $url, "mwScriptLoader$wgScriptExtension" ) === false ){
+if( $wgRequest->isPathInfoBad() ){
        wfHttpError( 403, 'Forbidden',
-               'mvwScriptLoader must be accessed through the primary script entry point.' );
+               'Invalid file extension found in PATH_INFO. ' . 
+               'mwScriptLoader must be accessed through the primary script entry point.' );
        return;
 }
 // Verify the script loader is on:
@@ -48,13 +44,12 @@ if ( !$wgEnableScriptLoader ) {
        die( 1 );
 }
 
+//moved to setup.php
 // load the mwEmbed language file:
-$wgExtensionMessagesFiles['mwEmbed'] = "{$IP}/js2/mwEmbed/php/languages/mwEmbed.i18n.php";
-// enable the msgs before we go on:
-wfLoadExtensionMessages( 'mwEmbed' );
+//$wgExtensionMessagesFiles['mwEmbed'] = "{$IP}/js2/mwEmbed/php/languages/mwEmbed.i18n.php";
 
 // run jsScriptLoader action:
 $myScriptLoader = new jsScriptLoader();
 $myScriptLoader->doScriptLoader();
 
-wfProfileOut( 'mvwScriptLoader.php' );
\ No newline at end of file
+wfProfileOut( 'mwScriptLoader.php' );