r81251 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81250‎ | r81251 | r81252 >
Date:14:33, 31 January 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Fixed compatibility with 1.15.x
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php
@@ -118,8 +118,11 @@
119119 }
120120
121121 // load jQuery
122 - global $wgOut;
123 - $wgOut->includeJQuery(); // only necessary in MW 1.16, does nothing in MW 1.17+
 122+ // only necessary in MW 1.16, does nothing in MW 1.17+
 123+ global $wgVersion, $wgOut;
 124+ if ( version_compare( $wgVersion, '1.17', '<=' ) && is_callable( array( $wgOut, 'includeJQuery' ) ) ) {
 125+ $wgOut->includeJQuery(); // Fixme: this is including jQuery on every page load
 126+ }
124127
125128 return true;
126129 }