Index: trunk/extensions/SemanticForms/includes/SF_ParserFunctions.php |
— | — | @@ -118,8 +118,11 @@ |
119 | 119 | } |
120 | 120 | |
121 | 121 | // 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 | + } |
124 | 127 | |
125 | 128 | return true; |
126 | 129 | } |