Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -199,7 +199,7 @@ |
200 | 200 | */ |
201 | 201 | function addScriptClass( $js_class ){ |
202 | 202 | global $wgDebugJavaScript, $wgJSAutoloadLocalClasses, $wgJSAutoloadClasses, |
203 | | - $wgEnableScriptLoader, $wgStyleVersion, $wgScriptPath; |
| 203 | + $wgEnableScriptLoader, $wgStyleVersion, $wgScriptPath, $wgEnableJS2system; |
204 | 204 | |
205 | 205 | $path = jsScriptLoader::getJsPathFromClass( $js_class ); |
206 | 206 | if( $path !== false ){ |
— | — | @@ -214,10 +214,12 @@ |
215 | 215 | $urlAppend = ( $wgDebugJavaScript ) ? time() : $this->getURIDparam( $js_class ); |
216 | 216 | $this->addScript( Html::linkedScript( "$path?$urlAppend" ) ); |
217 | 217 | |
218 | | - //merge in language text: |
219 | | - $inlineMsg = jsScriptLoader::getLocalizedMsgsFromClass( $js_class ); |
220 | | - if( $inlineMsg != '' ) |
221 | | - $this->addScript( Html::inlineScript( $inlineMsg )); |
| 218 | + //merge in language text (if js2 is on and we have loadGM function) |
| 219 | + if( $wgEnableJS2system == true ){ |
| 220 | + $inlineMsg = jsScriptLoader::getLocalizedMsgsFromClass( $js_class ); |
| 221 | + if( $inlineMsg != '' ) |
| 222 | + $this->addScript( Html::inlineScript( $inlineMsg )); |
| 223 | + } |
222 | 224 | } |
223 | 225 | return true; |
224 | 226 | } |
— | — | @@ -1158,8 +1160,8 @@ |
1159 | 1161 | $this->addScriptFile( 'rightclickedit.js' ); |
1160 | 1162 | } |
1161 | 1163 | |
1162 | | - global $wgUseAJAXCategories; |
1163 | | - if ($wgUseAJAXCategories) { |
| 1164 | + global $wgUseAJAXCategories, $wgEnableJS2system; |
| 1165 | + if ($wgUseAJAXCategories && $wgEnableJS2system) { |
1164 | 1166 | global $wgAJAXCategoriesNamespaces; |
1165 | 1167 | |
1166 | 1168 | $title = $this->getTitle(); |