r58987 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58986‎ | r58987 | r58988 >
Date:23:19, 12 November 2009
Author:werdna
Status:deferred
Tags:
Comment:
LiquidThreads: Add configurable $wgLiquidThreadsExtensionName variable, for splitting into versions on Wikimedia.
Modified paths:
  • /trunk/extensions/LiquidThreads/LiquidThreads.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/View.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/LiquidThreads.php
@@ -172,6 +172,9 @@
173173 $wgAutoloadClasses['ApiThreadAction'] = "$dir/api/ApiThreadAction.php";
174174 $wgAPIModules['threadaction'] = 'ApiThreadAction';
175175
 176+// Name of the extension (wmf-specific, for splitting to versions)
 177+$wgLiquidThreadsExtensionName = 'LiquidThreads';
 178+
176179 /** CONFIGURATION SECTION */
177180
178181 $wgDefaultUserOptions['lqt-watch-threads'] = true;
Index: trunk/extensions/LiquidThreads/classes/View.php
@@ -790,18 +790,21 @@
791791 global $wgOut;
792792 global $wgScriptPath, $wgStyleVersion;
793793 global $wgEnableJS2system;
 794+ global $wgLiquidThreadsExtensionName;
794795
795796 $wgOut->addInlineScript( 'var wgLqtMessages = ' . self::exportJSLocalisation() . ';' );
796797
 798+ $basePath = "$wgScriptPath/extensions/$wgLiquidThreadsExtensionName";
 799+
797800 if ( !$wgEnableJS2system ) {
798 - $wgOut->addScriptFile( "{$wgScriptPath}/extensions/LiquidThreads/jquery/js2.combined.js" );
799 - $wgOut->addExtensionStyle( "{$wgScriptPath}/extensions/LiquidThreads/jquery/jquery-ui-1.7.2.css" );
 801+ $wgOut->addScriptFile( "$basePath/jquery/js2.combined.js" );
 802+ $wgOut->addExtensionStyle( "$basePath/jquery/jquery-ui-1.7.2.css" );
800803 }
801804
802 - $wgOut->addScriptFile( "{$wgScriptPath}/extensions/LiquidThreads/jquery/jquery.autogrow.js" );
 805+ $wgOut->addScriptFile( "$basePath/jquery/jquery.autogrow.js" );
803806
804 - $wgOut->addScriptFile( "{$wgScriptPath}/extensions/LiquidThreads/lqt.js" );
805 - $wgOut->addExtensionStyle( "{$wgScriptPath}/extensions/LiquidThreads/lqt.css?{$wgStyleVersion}" );
 807+ $wgOut->addScriptFile( "$basePath/lqt.js" );
 808+ $wgOut->addExtensionStyle( "$basePath/lqt.css?{$wgStyleVersion}" );
806809
807810 self::$stylesAndScriptsDone = true;
808811 }

Status & tagging log