From: Alexandre Emsenhuber Date: Wed, 2 Jun 2010 19:28:44 +0000 (+0000) Subject: * Use Html::linkedScript() and Html::inlineScript() X-Git-Tag: 1.31.0-rc.0~36637 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dcompta/operations/modifier.php?a=commitdiff_plain;h=3d57cb9db8974deadf483c6ef9f70ba9862a4034;p=lhc%2Fweb%2Fwiklou.git * Use Html::linkedScript() and Html::inlineScript() --- diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index 19dd523cbe..41436a5074 100644 --- a/includes/ProtectionForm.php +++ b/includes/ProtectionForm.php @@ -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 ); } /**