From 6a58dcf8ebf3af709a422f86186b2dd95e5eeb31 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Sun, 24 Jan 2010 19:43:02 +0000 Subject: [PATCH] Use Html::linkedScript() Follow-up to r61432. This has a simpler call interface and encapsulates ugly $wgJsMimeType nonsense. --- includes/OutputPage.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) 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" ) ); } /** -- 2.20.1