r70100 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70099‎ | r70100 | r70101 >
Date:17:59, 28 July 2010
Author:mah
Status:deferred (Comments)
Tags:
Comment:
re-apply r70076, WITH A FIX!
Modified paths:
  • /trunk/extensions/LiquidThreads/classes/View.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/NewUserMessagesView.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/SpecialHotTopics.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/TalkpageHistoryView.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/TalkpageView.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/ThreadHistoryListingView.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/ThreadPermalinkView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/classes/View.php
@@ -1208,11 +1208,6 @@
12091209 $wgOut->addScriptFile( "$wgLiquidThreadsExtensionPath/js/lqt.toolbar.js" );
12101210 $wgOut->addExtensionStyle( "$wgLiquidThreadsExtensionPath/lqt.css?{$wgStyleVersion}" );
12111211
1212 - if ( class_exists( 'WikiEditorHooks' ) ) {
1213 - $temp = null;
1214 - WikiEditorHooks::addModules( $temp );
1215 - }
1216 -
12171212 self::$stylesAndScriptsDone = true;
12181213 }
12191214
@@ -1892,6 +1887,9 @@
18931888 $replyTo = $this->methodAppliesToThread( 'reply', $thread );
18941889
18951890 $html = '';
 1891+ if ( wfRunHooks( 'EditPageBeforeEditToolbar', array( &$html ) ) ) {
 1892+ self::addJSandCSS();
 1893+ }
18961894
18971895 $class = $this->threadDivClass( $thread );
18981896 if ( $levelNum == 1 ) {
@@ -1905,7 +1903,7 @@
19061904 } else {
19071905 $class .= ' lqt-thread-no-subthreads';
19081906 }
1909 -
 1907+
19101908 $class .= ' lqt-thread-wrapper';
19111909
19121910 $html .= Xml::openElement(
@@ -1915,7 +1913,7 @@
19161914 'id' => 'lqt_thread_id_' . $thread->id()
19171915 )
19181916 );
1919 -
 1917+
19201918 $html .= Xml::element( 'a', array( 'name' => $this->anchorName( $thread ) ), ' ' );
19211919 $html .= $this->showThreadHeading( $thread );
19221920
Index: trunk/extensions/LiquidThreads/pages/TalkpageHistoryView.php
@@ -5,7 +5,6 @@
66 function show() {
77 global $wgUser;
88
9 - self::addJSandCSS();
109 wfLoadExtensionMessages( 'LiquidThreads' );
1110
1211 $sk = $wgUser->getSkin();
Index: trunk/extensions/LiquidThreads/pages/ThreadPermalinkView.php
@@ -232,7 +232,6 @@
233233 $this->output->addFeedLink( $format, $url );
234234 }
235235
236 - self::addJSandCSS();
237236 $this->output->setSubtitle( $this->getSubtitle() );
238237
239238 if ( $this->methodApplies( 'summarize' ) )
Index: trunk/extensions/LiquidThreads/pages/NewUserMessagesView.php
@@ -83,8 +83,6 @@
8484 }
8585
8686 function showOnce() {
87 - self::addJSandCSS();
88 -
8987 NewMessages::recacheMessageCount( $this->user->getId() );
9088
9189 static $scriptDone = false;
Index: trunk/extensions/LiquidThreads/pages/SpecialHotTopics.php
@@ -14,8 +14,6 @@
1515 $wgOut->setPageTitle( wfMsg( 'lqt-hot-topics' ) );
1616 $view = LqtView::getView();
1717
18 - LqtView::addJsAndCss();
19 -
2018 // Get hot topics
2119 $topics = LqtHotTopicsController::getHotThreads();
2220
Index: trunk/extensions/LiquidThreads/pages/ThreadHistoryListingView.php
@@ -7,7 +7,6 @@
88 $this->showMissingThreadPage();
99 return false;
1010 }
11 - self::addJSandCSS();
1211 wfLoadExtensionMessages( 'LiquidThreads' );
1312
1413 $this->thread->updateHistory();
Index: trunk/extensions/LiquidThreads/pages/TalkpageView.php
@@ -223,7 +223,6 @@
224224 wfLoadExtensionMessages( 'LiquidThreads' );
225225
226226 $this->output->setPageTitle( $this->title->getPrefixedText() );
227 - self::addJSandCSS();
228227
229228 // Expose feed links.
230229 global $wgFeedClasses;

Follow-up revisions

RevisionCommit summaryAuthorDate
r70106Since script ordering matters, follow up r70100 with a way to load js files a...mah20:00, 28 July 2010
r70378Update LiquidThreads alpha to trunk state, with r70100 and r70106 unmerged du...werdna04:57, 3 August 2010
r70413re r70100, Reflect usage in core and discard hook return value.mah20:43, 3 August 2010
r71197Re-add a LqtView::addJSandCSS call removed in r70100 -- JS and CSS is needed ...werdna12:06, 17 August 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70076LiquidThreads: revert r69766 and friends r69774, r69803, r69804. Broken, and ...werdna10:36, 28 July 2010

Comments

#Comment by Werdna (talk | contribs)   04:46, 3 August 2010

Do we want that hook to prevent LiquidThreads JS and CSS from being loaded?

The usage in core discards the hook's return value, so maybe we shouldn't attach any semantic value to it.

#Comment by MarkAHershberger (talk | contribs)   20:44, 3 August 2010

Thanks, I was wondering what to do about that.

Status & tagging log