r78496 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78495‎ | r78496 | r78497 >
Date:17:33, 16 December 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Follow up to r78495
Modified paths:
  • /trunk/extensions/LiveTranslate/includes/LiveTranslate_Functions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiveTranslate/includes/LiveTranslate_Functions.php
@@ -10,9 +10,36 @@
1111 *
1212 * @author Jeroen De Dauw < jeroendedauw@gmail.com >
1313 */
14 -final class PushFunctions {
 14+final class LiveTranslateFunctions {
1515
1616 /**
 17+ * Loads the needed JavaScript.
 18+ * Takes care of non-RL compatibility.
 19+ *
 20+ * @since 0.1
 21+ */
 22+ protected static function loadJs() {
 23+ global $wgOut;
 24+
 25+ // For backward compatibility with MW < 1.17.
 26+ if ( is_callable( array( $wgOut, 'addModules' ) ) ) {
 27+ $wgOut->addModules( 'ext.livetranslate' );
 28+ }
 29+ else {
 30+ global $egLiveTranslateScriptPath;
 31+
 32+ self::addJSLocalisation();
 33+
 34+ $wgOut->includeJQuery();
 35+
 36+ $wgOut->addHeadItem(
 37+ 'ext.livetranslate',
 38+ Html::linkedScript( $egLiveTranslateScriptPath . '/includes/ext.livetranslate.js' )
 39+ );
 40+ }
 41+ }
 42+
 43+ /**
1744 * Adds the needed JS messages to the page output.
1845 * This is for backward compatibility with pre-RL MediaWiki.
1946 *

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78495Comment fix - follow up to r78494jeroendedauw16:24, 16 December 2010

Status & tagging log