From: Alexandre Emsenhuber Date: Wed, 5 Aug 2009 14:37:00 +0000 (+0000) Subject: * use wfScript() in OutputPage to build the url for mwScriptLoader.php so that $wgScr... X-Git-Tag: 1.31.0-rc.0~40483 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=9d26980c8b0c8fcf98aaa1a0dc6f0ce87ecb89b1;p=lhc%2Fweb%2Fwiklou.git * use wfScript() in OutputPage to build the url for mwScriptLoader.php so that $wgScriptExtension is used * use $wgScriptExtension when matching the path in mwScriptLoader.php * some more typos in mwScriptLoader.php --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 6f1831214b..38754f259d 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -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 ); diff --git a/mwScriptLoader.php b/mwScriptLoader.php index 527831e8d0..8637cc8cd4 100644 --- a/mwScriptLoader.php +++ b/mwScriptLoader.php @@ -27,10 +27,10 @@ // 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