From: Niklas Laxström Date: Wed, 24 Feb 2010 16:21:52 +0000 (+0000) Subject: Tidy up OutputPage::includeJQuery X-Git-Tag: 1.31.0-rc.0~37619 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=d1ffdf5ab3951f12ce8d7aa02a6cea64d09e90ae;p=lhc%2Fweb%2Fwiklou.git Tidy up OutputPage::includeJQuery --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 0677495ac8..0b4a45c668 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2580,20 +2580,18 @@ class OutputPage { * * @param $modules Array: list of jQuery modules which should be loaded * @return Array: the list of modules which were not loaded. + * @since 1.16 */ public function includeJQuery( $modules = array() ) { - global $wgStylePath, $wgStyleVersion, $wgJsMimeType; + global $wgStylePath, $wgStyleVersion; $supportedModules = array( /** TODO: add things here */ ); $unsupported = array_diff( $modules, $supportedModules ); - $params = array( - 'type' => $wgJsMimeType, - 'src' => "$wgStylePath/common/jquery.min.js?$wgStyleVersion", - ); + $url = "$wgStylePath/common/jquery.min.js?$wgStyleVersion"; if ( !$this->mJQueryDone ) { $this->mJQueryDone = true; - $this->mScripts = Html::element( 'script', $params ) . "\n" . $this->mScripts; + $this->mScripts = Html::linkedScript( $url ) . "\n" . $this->mScripts; } return $unsupported; }