Index: trunk/extensions/LiquidThreads/pages/NewUserMessagesView.php |
— | — | @@ -85,13 +85,6 @@ |
86 | 86 | function showOnce() { |
87 | 87 | NewMessages::recacheMessageCount( $this->user->getId() ); |
88 | 88 | |
89 | | - static $scriptDone = false; |
90 | | - |
91 | | - if ( !$scriptDone ) { |
92 | | - global $wgOut, $wgLiquidThreadsExtensionPath; |
93 | | - $wgOut->addScriptFile( "$wgLiquidThreadsExtensionPath/newmessages.js" ); |
94 | | - } |
95 | | - |
96 | 89 | $this->user->setNewtalk( false ); |
97 | 90 | |
98 | 91 | if ( $this->methodApplies( 'mark_as_unread' ) ) { |
— | — | @@ -208,7 +201,12 @@ |
209 | 202 | $mustShowThreads = $this->targets[$t->id()]; |
210 | 203 | |
211 | 204 | $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 | + } |
213 | 211 | $this->output->addHTML( "</td></tr>" ); |
214 | 212 | } |
215 | 213 | |