From: Aryeh Gregor Date: Sun, 24 Jan 2010 19:43:02 +0000 (+0000) Subject: Use Html::linkedScript() X-Git-Tag: 1.31.0-rc.0~38113 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=6a58dcf8ebf3af709a422f86186b2dd95e5eeb31;p=lhc%2Fweb%2Fwiklou.git Use Html::linkedScript() Follow-up to r61432. This has a simpler call interface and encapsulates ugly $wgJsMimeType nonsense. --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 26e1d60524..020709e11f 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -122,20 +122,13 @@ class OutputPage { * @param string $file filename in skins/common or complete on-server path (/foo/bar.js) */ function addScriptFile( $file ) { - global $wgStylePath, $wgStyleVersion, $wgJsMimeType; + global $wgStylePath, $wgStyleVersion; if( substr( $file, 0, 1 ) == '/' ) { $path = $file; } else { $path = "{$wgStylePath}/common/{$file}"; } - $this->addScript( - Html::element( 'script', - array( - 'type' => $wgJsMimeType, - 'src' => "$path?$wgStyleVersion", - ) - ) - ); + $this->addScript( Html::linkedScript( "$path?$wgStyleVersion" ) ); } /**