* Use Html::linkedScript() and Html::inlineScript()
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 2 Jun 2010 19:28:44 +0000 (19:28 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 2 Jun 2010 19:28:44 +0000 (19:28 +0000)
includes/ProtectionForm.php

index 19dd523..41436a5 100644 (file)
@@ -571,9 +571,7 @@ class ProtectionForm {
 
        function buildScript() {
                global $wgStylePath, $wgStyleVersion;
-               return Xml::tags( 'script', array(
-                       'type' => 'text/javascript',
-                       'src' => $wgStylePath . "/common/protect.js?$wgStyleVersion.1" ), '' );
+               return Html::linkedScript( "$wgStylePath/common/protect.js?$wgStyleVersion.1" );
        }
 
        function buildCleanupScript() {
@@ -595,7 +593,7 @@ class ProtectionForm {
                $encOptions = Xml::encodeJsVar( $options );
 
                $script .= "ProtectionForm.init($encOptions)";
-               return Xml::tags( 'script', array( 'type' => 'text/javascript' ), $script );
+               return Html::inlineScript( $script );
        }
 
        /**