Minor tweaks to r74232, add a value for $botMax on calls for integer validation ...
[lhc/web/wiklou.git] / includes / ProtectionForm.php
index 807cdc2..3272cfe 100644 (file)
@@ -592,7 +592,7 @@ class ProtectionForm {
                $encOptions = Xml::encodeJsVar( $options );
 
                $script .= "ProtectionForm.init($encOptions)";
-               return Html::inlineScript( "if ( mediaWiki !== undefined ) { mediaWiki.loader.using( 'mediawiki.legacy.protect', function() { {$script} } ); }" );
+               return Html::inlineScript( "if ( window.mediaWiki ) { $script }" );
        }
 
        /**