* use wfScript() in OutputPage to build the url for mwScriptLoader.php so that $wgScr...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 5 Aug 2009 14:37:00 +0000 (14:37 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 5 Aug 2009 14:37:00 +0000 (14:37 +0000)
* use $wgScriptExtension when matching the path in mwScriptLoader.php
* some more typos in mwScriptLoader.php

includes/OutputPage.php
mwScriptLoader.php

index 6f18312..38754f2 100644 (file)
@@ -244,7 +244,7 @@ class OutputPage {
         * @param $forcClassAry Boolean: false by default
         */
        function getScriptLoaderJs( $forceClassAry = false ){
-               global $wgScriptPath, $wgJsMimeType, $wgStyleVersion, $wgRequest, $wgDebugJavaScript;
+               global $wgJsMimeType, $wgStyleVersion, $wgRequest, $wgDebugJavaScript;
 
                if( !$forceClassAry ){
                        $class_list = implode( ',', $this->mScriptLoaderClassList );
@@ -266,7 +266,7 @@ class OutputPage {
                return Xml::element( 'script',
                                array(
                                        'type' => $wgJsMimeType,
-                                       'src' => "$wgScriptPath/mwScriptLoader.php?class={$class_list}{$debug_param}&".$this->getURIDparam(),
+                                       'src' => wfScript( 'mwScriptLoader' ) . "?class={$class_list}{$debug_param}&".$this->getURIDparam(),
                                ),
                                '', false
                );
index 527831e..8637cc8 100644 (file)
 // include WebStart.php
 require_once('includes/WebStart.php');
 
-wfProfileIn( 'mvwScriptLoader.php' );
+wfProfileIn( 'mwScriptLoader.php' );
 
 
-if( strpos( wfGetScriptUrl(), "mwScriptLoader.php" ) === false ){
+if( strpos( wfGetScriptUrl(), "mwScriptLoader{$wgScriptExtension}" ) === false ){
        wfHttpError( 403, 'Forbidden',
                'mwScriptLoader must be accessed through the primary script entry point.' );
        return;
@@ -51,4 +51,4 @@ if ( !$wgEnableScriptLoader ) {
 $myScriptLoader = new jsScriptLoader();
 $myScriptLoader->doScriptLoader();
 
-wfProfileOut( 'mvwScriptLoader.php' );
\ No newline at end of file
+wfProfileOut( 'mwScriptLoader.php' );
\ No newline at end of file