r61964 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61963‎ | r61964 | r61965 >
Date:00:11, 4 February 2010
Author:werdna
Status:ok
Tags:
Comment:
Revert stuff accidentally committed in r61963
Modified paths:
  • /trunk/extensions/LiquidThreads/classes/View.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/classes/View.php
@@ -843,50 +843,25 @@
844844 return;
845845 }
846846
847 - global $wgOut;
848 -
849 - $info = self::getScriptsAndStyles();
850 -
851 - foreach( $info['inlineScripts'] as $script ) {
852 - $wgOut->addInlineScript( $script );
853 - }
854 -
855 - foreach( $info['scripts'] as $script ) {
856 - $wgOut->addScriptFile( $script );
857 - }
858 -
859 - foreach( $info['styles'] as $style ) {
860 - $wgOut->addExtensionStyle( $style );
861 - }
 847+ global $wgOut, $wgStylePath;
 848+ global $wgScriptPath, $wgStyleVersion;
 849+ global $wgEnableJS2system;
 850+ global $wgLiquidThreadsExtensionName;
862851
 852+ $wgOut->addInlineScript( 'var wgLqtMessages = ' . self::exportJSLocalisation() . ';' );
 853+
 854+ $basePath = "$wgScriptPath/extensions/$wgLiquidThreadsExtensionName";
 855+
 856+ $wgOut->addScriptFile( "$basePath/jquery/js2.combined.js" );
 857+ $wgOut->addExtensionStyle( "$basePath/jquery/jquery-ui-1.7.2.css" );
 858+
 859+ $wgOut->addScriptFile( "$basePath/jquery/jquery.autogrow.js" );
 860+
 861+ $wgOut->addScriptFile( "$basePath/lqt.js" );
 862+ $wgOut->addExtensionStyle( "$basePath/lqt.css?{$wgStyleVersion}" );
 863+
863864 self::$stylesAndScriptsDone = true;
864865 }
865 -
866 - static function getScriptsAndStyles() {
867 - global $wgLiquidThreadsExtensionName, $wgStylePath, $wgScriptPath, $wgStyleVersion;
868 - $basePath = "$wgScriptPath/extensions/$wgLiquidThreadsExtensionName";
869 -
870 - $inlineScripts = array(
871 - 'var wgLqtMessages = ' . self::exportJSLocalisation() . ';',
872 - );
873 -
874 - $scripts = array(
875 - "$basePath/jquery/js2.combined.js",
876 - "$basePath/jquery/jquery.autogrow.js",
877 - "$basePath/lqt.js",
878 - );
879 -
880 - $styles = array(
881 - "$basePath/jquery/jquery-ui-1.7.2.css",
882 - "$basePath/lqt.css?{$wgStyleVersion}",
883 - );
884 -
885 - return array(
886 - 'inlineScripts' => $inlineScripts,
887 - 'scripts' => $scripts,
888 - 'styles' => $styles,
889 - );
890 - }
891866
892867 static function exportJSLocalisation() {
893868 wfLoadExtensionMessages( 'LiquidThreads' );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r61963Fix bug in AJAX saving that broke non-AJAX saving of post editswerdna00:10, 4 February 2010

Status & tagging log