r70448 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70447‎ | r70448 | r70449 >
Date:04:30, 4 August 2010
Author:mah
Status:deferred
Tags:
Comment:
provide a simpler, faster fix for the problem that r70106 was trying to solve.
Modified paths:
  • /trunk/extensions/LiquidThreads/pages/NewUserMessagesView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/pages/NewUserMessagesView.php
@@ -85,13 +85,6 @@
8686 function showOnce() {
8787 NewMessages::recacheMessageCount( $this->user->getId() );
8888
89 - static $scriptDone = false;
90 -
91 - if ( !$scriptDone ) {
92 - global $wgOut, $wgLiquidThreadsExtensionPath;
93 - $wgOut->addScriptFile( "$wgLiquidThreadsExtensionPath/newmessages.js" );
94 - }
95 -
9689 $this->user->setNewtalk( false );
9790
9891 if ( $this->methodApplies( 'mark_as_unread' ) ) {
@@ -208,7 +201,12 @@
209202 $mustShowThreads = $this->targets[$t->id()];
210203
211204 $this->showThread( $t, 1, 1, array( 'mustShowThreads' => $mustShowThreads ) );
212 -
 205+ static $scriptDone = false;
 206+ if ( !$scriptDone ) {
 207+ global $wgLiquidThreadsExtensionPath;
 208+ $this->output->addScriptFile( "$wgLiquidThreadsExtensionPath/newmessages.js" );
 209+ $scriptDone = true;
 210+ }
213211 $this->output->addHTML( "</td></tr>" );
214212 }
215213

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70106Since script ordering matters, follow up r70100 with a way to load js files a...mah20:00, 28 July 2010

Status & tagging log