Index: branches/resourceloader/phase3/includes/ProtectionForm.php |
— | — | @@ -592,7 +592,7 @@ |
593 | 593 | $encOptions = Xml::encodeJsVar( $options ); |
594 | 594 | |
595 | 595 | $script .= "ProtectionForm.init($encOptions)"; |
596 | | - return Html::inlineScript( "mediaWiki.loader.using( 'mediawiki.legacy.protect', function() { {$script} } );" ); |
| 596 | + return Html::inlineScript( "if ( mediaWiki !== undefined ) { mediaWiki.loader.using( 'mediawiki.legacy.protect', function() { {$script} } ); }" ); |
597 | 597 | } |
598 | 598 | |
599 | 599 | /** |
Index: branches/resourceloader/phase3/includes/EditPage.php |
— | — | @@ -2246,9 +2246,9 @@ |
2247 | 2247 | } |
2248 | 2248 | |
2249 | 2249 | $wgOut->addScript( Html::inlineScript( |
2250 | | - "\nmediaWiki.loader.using( 'mediawiki.legacy.edit', function() { $script } );\n" |
| 2250 | + "if ( mediaWiki !== undefined ) { mediaWiki.loader.using( 'mediawiki.legacy.edit', function() { $script } ); }" |
2251 | 2251 | ) ); |
2252 | | - |
| 2252 | + |
2253 | 2253 | $toolbar .= "\n</div>"; |
2254 | 2254 | |
2255 | 2255 | wfRunHooks( 'EditPageBeforeEditToolbar', array( &$toolbar ) ); |