r63590 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63589‎ | r63590 | r63591 >
Date:09:58, 11 March 2010
Author:nikerabbit
Status:ok
Tags:
Comment:
Need to load jQuery for old style editing too

The copy this suggestion feature needs it.
Modified paths:
  • /trunk/extensions/Translate/TranslateEditAddons.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/TranslateEditAddons.php
@@ -2,7 +2,8 @@
33 if ( !defined( 'MEDIAWIKI' ) ) die();
44
55 /**
6 - * Tools for edit page view to aid translators.
 6+ * Tools for edit page view to aid translators. This implements the so called
 7+ * old style editing, which extends the normal edit page.
78 *
89 * @author Niklas Laxström
910 * @author Siebrand Mazeland
@@ -205,6 +206,12 @@
206207 }
207208
208209 TranslateUtils::injectCSS();
 210+ if ( !method_exists( $wgOut, 'includeJQuery' ) ) {
 211+ $wgOut->includeJQuery();
 212+ } else {
 213+ // MW 1.15 and older
 214+ $wgOut->addScriptFile( TranslateUtils::assetPath( 'js/js2stopgap.js' ) );
 215+ }
209216 return $th->getBoxes();
210217 }
211218

Status & tagging log