r75515 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75514‎ | r75515 | r75516 >
Date:11:33, 27 October 2010
Author:reedy
Status:deferred
Tags:
Comment:
Remove a lot of the deprecated wfLoadExtension calls. Calls to Xml::hidden to Html::hidden. Other bits and pieces
Modified paths:
  • /trunk/extensions/LiquidThreads/api/ApiFeedLQTThreads.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/DeletionController.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/Hooks.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/NewMessagesController.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/Thread.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/Threads.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/View.php (modified) (history)
  • /trunk/extensions/LiquidThreads/compat/HTMLForm.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/NewUserMessagesView.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/SpecialHotTopics.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/SpecialMergeThread.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/SpecialMoveThread.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/SpecialNewMessages.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/SpecialSplitThread.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/SummaryPageView.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/TalkpageHeaderView.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/TalkpageHistoryView.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/TalkpageView.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/ThreadActionPage.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/ThreadHistoricalRevisionView.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/compat/HTMLForm.php
@@ -25,8 +25,6 @@
2626 );
2727
2828 function __construct( $descriptor, $messagePrefix ) {
29 - wfLoadExtensionMessages( 'Lqt-Compat' );
30 -
3129 $this->mMessagePrefix = $messagePrefix;
3230
3331 // Expand out into a tree.
@@ -188,8 +186,8 @@
189187 global $wgUser;
190188 $html = '';
191189
192 - $html .= Xml::hidden( 'wpEditToken', $wgUser->editToken() ) . "\n";
193 - $html .= Xml::hidden( 'title', $this->getTitle() ) . "\n";
 190+ $html .= Html::hidden( 'wpEditToken', $wgUser->editToken() ) . "\n";
 191+ $html .= Html::hidden( 'title', $this->getTitle() ) . "\n";
194192
195193 return $html;
196194 }
Index: trunk/extensions/LiquidThreads/classes/Threads.php
@@ -59,7 +59,6 @@
6060 public static function createTalkpageIfNeeded( $talkpage ) {
6161 if ( ! $talkpage->exists() ) {
6262 try {
63 - wfLoadExtensionMessages( 'LiquidThreads' );
6463 $talkpage->doEdit(
6564 "",
6665 wfMsgForContent( 'lqt_talkpage_autocreate_summary' ),
@@ -76,7 +75,7 @@
7776 $rows = array();
7877 $threads = array();
7978
80 - while ( $row = $db->fetchObject( $res ) ) {
 79+ foreach( $res as $row ) {
8180 $rows[] = $row;
8281
8382 if ( !$bulkLoad ) {
@@ -190,8 +189,6 @@
191190 }
192191
193192 static function newThreadTitle( $subject, $article ) {
194 - wfLoadExtensionMessages( 'LiquidThreads' );
195 -
196193 $base = $article->getTitle()->getPrefixedText() . "/$subject";
197194
198195 return self::incrementedTitle( $base, NS_LQT_THREAD );
@@ -202,7 +199,6 @@
203200 }
204201
205202 static function newReplyTitle( $thread, $user ) {
206 - wfLoadExtensionMessages( 'LiquidThreads' );
207203 $topThread = $thread->topmostThread();
208204
209205 $base = $topThread->title()->getText() . '/'
Index: trunk/extensions/LiquidThreads/classes/View.php
@@ -291,12 +291,11 @@
292292 function perpetuate( $name, $as = 'hidden' ) {
293293 $value = $this->request->getVal( $name, '' );
294294 if ( $as == 'hidden' ) {
295 - return Xml::hidden( $name, $value );
 295+ return Html::hidden( $name, $value );
296296 }
297297 }
298298
299299 function showReplyProtectedNotice( $thread ) {
300 - wfLoadExtensionMessages( 'LiquidThreads' );
301300 $log_url = SpecialPage::getTitleFor( 'Log' )->getFullURL(
302301 "type=protect&user=&page={$thread->title()->getPrefixedURL()}" );
303302 $this->output->addHTML( '<p>' . wfMsg( 'lqt_protectedfromreply',
@@ -425,7 +424,7 @@
426425 $e->editFormTextBeforeContent .=
427426 $this->perpetuate( 'lqt_method', 'hidden' ) .
428427 $this->perpetuate( 'lqt_operand', 'hidden' ) .
429 - Xml::hidden( 'lqt_nonce', wfGenerateToken() );
 428+ Html::hidden( 'lqt_nonce', wfGenerateToken() );
430429
431430 $e->mShowSummaryField = false;
432431
@@ -536,9 +535,9 @@
537536 $e->editFormTextBeforeContent .=
538537 $this->perpetuate( 'lqt_method', 'hidden' ) .
539538 $this->perpetuate( 'lqt_operand', 'hidden' ) .
540 - Xml::hidden( 'lqt_nonce', wfGenerateToken() ) .
541 - Xml::hidden( 'offset', $offset ) .
542 - Xml::hidden( 'wpMinorEdit', '' );
 539+ Html::hidden( 'lqt_nonce', wfGenerateToken() ) .
 540+ Html::hidden( 'offset', $offset ) .
 541+ Html::hidden( 'wpMinorEdit', '' );
543542
544543 list( $signatureEditor, $signatureHTML ) = $this->getSignatureEditor( $this->user );
545544
@@ -644,8 +643,8 @@
645644 $e->editFormTextBeforeContent .=
646645 $this->perpetuate( 'lqt_method', 'hidden' ) .
647646 $this->perpetuate( 'lqt_operand', 'hidden' ) .
648 - Xml::hidden( 'lqt_nonce', wfGenerateToken() ) .
649 - Xml::hidden( 'offset', $offset );
 647+ Html::hidden( 'lqt_nonce', wfGenerateToken() ) .
 648+ Html::hidden( 'offset', $offset );
650649
651650 list( $signatureEditor, $signatureHTML ) = $this->getSignatureEditor( $thread );
652651
@@ -725,8 +724,8 @@
726725 $e->editFormTextBeforeContent .=
727726 $this->perpetuate( 'lqt_method', 'hidden' ) .
728727 $this->perpetuate( 'lqt_operand', 'hidden' ) .
729 - Xml::hidden( 'lqt_nonce', wfGenerateToken() ) .
730 - Xml::hidden( 'offset', $offset );
 728+ Html::hidden( 'lqt_nonce', wfGenerateToken() ) .
 729+ Html::hidden( 'offset', $offset );
731730
732731 $e->edit();
733732
@@ -1011,7 +1010,6 @@
10121011 * )
10131012 */
10141013 function threadCommands( $thread ) {
1015 - wfLoadExtensionMessages( 'LiquidThreads' );
10161014 $commands = array();
10171015
10181016 $history_url = self::permalinkUrlWithQuery( $thread, array( 'action' => 'history' ) );
@@ -1090,8 +1088,6 @@
10911089
10921090 // Commands for the bottom.
10931091 function threadMajorCommands( $thread ) {
1094 - wfLoadExtensionMessages( 'LiquidThreads' );
1095 -
10961092 if ( $thread->isHistorical() ) {
10971093 // No links for historical threads.
10981094 $history_url = self::permalinkUrlWithQuery( $thread,
@@ -1155,7 +1151,6 @@
11561152 }
11571153
11581154 function topLevelThreadCommands( $thread ) {
1159 - wfLoadExtensionMessages( 'LiquidThreads' );
11601155 $commands = array();
11611156
11621157 $commands['history'] = array(
@@ -1253,8 +1248,6 @@
12541249 }
12551250
12561251 static function exportJSLocalisation() {
1257 - wfLoadExtensionMessages( 'LiquidThreads' );
1258 -
12591252 $messages = array(
12601253 'lqt-quote-intro',
12611254 'lqt-quote',
@@ -1578,7 +1571,7 @@
15791572
15801573 if ( $show ) {
15811574 $html = Xml::tags( 'span', array( 'class' => 'mw-headline' ), $html );
1582 - $html .= Xml::hidden( 'raw-header', $thread->subject() );
 1575+ $html .= Html::hidden( 'raw-header', $thread->subject() );
15831576 $html = Xml::tags( 'h' . $this->headerLevel,
15841577 array( 'class' => 'lqt_header', 'id' => $id ),
15851578 $html ) . $commands_html;
@@ -1663,8 +1656,6 @@
16641657
16651658 // Shows a single thread, rather than a thread tree.
16661659 function showSingleThread( $thread ) {
1667 - wfLoadExtensionMessages( 'LiquidThreads' );
1668 -
16691660 $html = '';
16701661
16711662 // If it's a 'moved' thread, show the placeholder
@@ -1733,7 +1724,7 @@
17341725
17351726 $link = $sk->link( $linkTitle, $linkText,
17361727 array( 'class' => 'lqt-show-more-posts' ) );
1737 - $link .= Xml::hidden( 'lqt-thread-start-at', $i,
 1728+ $link .= Html::hidden( 'lqt-thread-start-at', $i,
17381729 array( 'class' => 'lqt-thread-start-at' ) );
17391730
17401731 return $link;
@@ -1964,13 +1955,13 @@
19651956 'class' => 'lqt-thread-modified'
19661957 )
19671958 );
1968 - $html .= Xml::hidden(
 1959+ $html .= Html::hidden(
19691960 'lqt-thread-sortkey',
19701961 $thread->sortkey(),
19711962 array( 'id' => 'lqt-thread-sortkey-' . $thread->id() )
19721963 );
19731964
1974 - $html .= Xml::hidden(
 1965+ $html .= Html::hidden(
19751966 'lqt-thread-talkpage-' . $thread->id(),
19761967 $thread->article()->getTitle()->getPrefixedText(),
19771968 array(
@@ -1984,7 +1975,7 @@
19851976 }
19861977
19871978 // Add the thread's title
1988 - $html .= Xml::hidden(
 1979+ $html .= Html::hidden(
19891980 'lqt-thread-title-' . $thread->id(),
19901981 $thread->title()->getPrefixedText(),
19911982 array(
@@ -2114,9 +2105,12 @@
21152106 }
21162107
21172108 function getSummary( $t ) {
2118 - if ( !$t->summary() ) return;
2119 - if ( !$t->summary()->getContent() ) return; // Blank summary
2120 - wfLoadExtensionMessages( 'LiquidThreads' );
 2109+ if ( !$t->summary() ) {
 2110+ return;
 2111+ }
 2112+ if ( !$t->summary()->getContent() ) {
 2113+ return; // Blank summary
 2114+ }
21212115 global $wgUser;
21222116 $sk = $wgUser->getSkin();
21232117
@@ -2134,7 +2128,7 @@
21352129
21362130 $link = $sk->link( $t->summary()->getTitle(), $link_text,
21372131 array( 'class' => 'lqt-summary-link' ) );
2138 - $link .= Xml::hidden( 'summary-title', $t->summary()->getTitle()->getPrefixedText() );
 2132+ $link .= Html::hidden( 'summary-title', $t->summary()->getTitle()->getPrefixedText() );
21392133 $edit_link = self::permalink( $t, $edit_text, 'summarize', $t->id() );
21402134 $links = "[$link]\n[$edit_link]";
21412135 $html .= Xml::tags(
Index: trunk/extensions/LiquidThreads/classes/Hooks.php
@@ -25,10 +25,11 @@
2626 return true;
2727
2828 $thread = Threads::withRoot( new Article( $rc->getTitle() ) );
29 - if ( !$thread ) return true;
 29+ if ( !$thread ) {
 30+ return true;
 31+ }
3032
3133 LqtView::addJSandCSS();
32 - wfLoadExtensionMessages( 'LiquidThreads' );
3334
3435 global $wgUser, $wgLang;
3536 $sk = $wgUser->getSkin();
@@ -62,7 +63,6 @@
6364 static function setNewtalkHTML( $skintemplate, $tpl ) {
6465 global $wgUser, $wgTitle, $wgOut;
6566
66 - wfLoadExtensionMessages( 'LiquidThreads' );
6767 $newmsg_t = SpecialPage::getTitleFor( 'NewMessages' );
6868 $watchlist_t = SpecialPage::getTitleFor( 'Watchlist' );
6969 $usertalk_t = $wgUser->getTalkPage();
@@ -105,7 +105,6 @@
106106 return true;
107107
108108 LqtView::addJSandCSS();
109 - wfLoadExtensionMessages( 'LiquidThreads' );
110109 $messages_title = SpecialPage::getTitleFor( 'NewMessages' );
111110 $new_messages = wfMsgExt( 'lqt-new-messages', 'parseinline' );
112111
@@ -119,7 +118,6 @@
120119
121120 static function getPreferences( $user, &$preferences ) {
122121 global $wgEnableEmail;
123 - wfLoadExtensionMessages( 'LiquidThreads' );
124122
125123 if ( $wgEnableEmail ) {
126124 $preferences['lqtnotifytalk'] =
@@ -253,7 +251,6 @@
254252 }
255253
256254 if ( $title->getNamespace() == NS_LQT_THREAD && self::$editType != 'new' ) {
257 - wfLoadExtensionMessages( 'LiquidThreads' );
258255 $label = wfMsgExt( 'lqt-edit-bump', 'parseinline' );
259256 $tooltip = wfMsgExt( 'lqt-edit-bump-tooltip', 'parsemag' );
260257
@@ -275,8 +272,6 @@
276273 }
277274
278275 static function customiseSearchProfiles( &$profiles ) {
279 - wfLoadExtensionMessages( 'LiquidThreads' );
280 -
281276 $namespaces = array( NS_LQT_THREAD, NS_LQT_SUMMARY );
282277
283278 // Add odd namespaces
@@ -406,8 +401,6 @@
407402 return true;
408403 }
409404
410 - wfLoadExtensionMessages( 'LiquidThreads' );
411 -
412405 $newMessagesCount = NewMessages::newMessageCount( $wgUser );
413406
414407 // Add new messages link.
@@ -555,8 +548,6 @@
556549 * @param $key String: message key that should contain a template page name
557550 */
558551 private static function getTextForPageInKey( $key ) {
559 - wfLoadExtensionMessages( 'LiquidThreads' );
560 -
561552 $templateTitleText = wfMsgForContent( $key );
562553 $templateTitle = Title::newFromText( $templateTitleText );
563554
Index: trunk/extensions/LiquidThreads/classes/NewMessagesController.php
@@ -165,7 +165,7 @@
166166 $userIds = array();
167167 $notifyUsers = array();
168168 $obj = self::getRowsObject( $t );
169 - while ( $row = $dbr->fetchObject( $obj ) ) {
 169+ foreach( $res as $row ) {
170170 // Don't notify yourself
171171 if ( $changeUser->getId() == $row->wl_user )
172172 continue;
@@ -248,7 +248,6 @@
249249 }
250250
251251 static function notifyUsersByMail( $t, $watching_users, $timestamp, $type ) {
252 - wfLoadExtensionMessages( 'LiquidThreads' );
253252 $messages = array(
254253 Threads::CHANGE_REPLY_CREATED => 'lqt-enotif-reply',
255254 Threads::CHANGE_NEW_THREAD => 'lqt-enotif-newthread',
@@ -319,7 +318,7 @@
320319
321320 // Parse content and strip HTML of post content
322321
323 - while ( $row = $dbr->fetchObject( $res ) ) {
 322+ foreach( $res as $row ) {
324323 $u = User::newFromRow( $row );
325324
326325 if ( $oldPreferenceFormat ) {
Index: trunk/extensions/LiquidThreads/classes/DeletionController.php
@@ -22,7 +22,6 @@
2323 $thread->delete( $reason );
2424
2525 // Avoid orphaning subthreads, update their parentage.
26 - wfLoadExtensionMessages( 'LiquidThreads' );
2726 if ( $thread->replies() && $thread->isTopmostThread() ) {
2827 $reason = wfMsg( 'lqt-delete-parent-deleted', $reason );
2928 self::recursivelyDeleteReplies( $thread, $reason );
@@ -102,10 +101,11 @@
103102
104103 $thread = Threads::withRoot( $article );
105104
106 - if ( !$thread ) return true;
 105+ if ( !$thread ) {
 106+ return true;
 107+ }
107108
108109 if ( $thread->isTopmostThread() && count( $thread->replies() ) ) {
109 - wfLoadExtensionMessages( 'LiquidThreads' );
110110 $out->wrapWikiMsg(
111111 '<strong>$1</strong>',
112112 'lqt-delete-parent-warning'
Index: trunk/extensions/LiquidThreads/classes/Thread.php
@@ -607,13 +607,14 @@
608608 'thread_type != ' . $dbr->addQuotes( Threads::TYPE_DELETED ) ),
609609 __METHOD__ );
610610
611 - while ( $row = $dbr->fetchObject( $res ) ) {
 611+ foreach( $res as $row ) {
612612 // Grab page data while we're here.
613 - if ( $row->thread_root )
 613+ if ( $row->thread_root ) {
614614 $pageIds[] = $row->thread_root;
615 - if ( $row->thread_summary_page )
 615+ }
 616+ if ( $row->thread_summary_page ) {
616617 $pageIds[] = $row->thread_summary_page;
617 -
 618+ }
618619 $all_thread_rows[] = $row;
619620 $all_thread_ids[$row->thread_id] = $row->thread_id;
620621 }
@@ -659,13 +660,13 @@
660661 $restrictionRows = array_fill_keys( $pageIds, array() );
661662 $res = $dbr->select( 'page_restrictions', '*', array( 'pr_page' => $pageIds ),
662663 __METHOD__ );
663 - while ( $row = $dbr->fetchObject( $res ) ) {
 664+ foreach( $res as $row ) {
664665 $restrictionRows[$row->pr_page][] = $row;
665666 }
666667
667668 $res = $dbr->select( 'page', '*', array( 'page_id' => $pageIds ), __METHOD__ );
668669
669 - while ( $row = $dbr->fetchObject( $res ) ) {
 670+ foreach( $res as $row ) {
670671 $t = Title::newFromRow( $row );
671672
672673 if ( isset( $restrictionRows[$t->getArticleId()] ) ) {
@@ -1008,7 +1009,7 @@
10091010 __METHOD__ );
10101011
10111012 $rows = array();
1012 - while ( $row = $dbr->fetchObject( $res ) ) {
 1013+ foreach( $res as $row ) {
10131014 $rows[] = $row;
10141015 }
10151016
Index: trunk/extensions/LiquidThreads/pages/TalkpageHeaderView.php
@@ -42,8 +42,6 @@
4343 global $wgOut, $wgTitle, $wgRequest;
4444
4545 if ( $wgRequest->getVal( 'action' ) === 'edit' ) {
46 - wfLoadExtensionMessages( 'LiquidThreads' );
47 -
4846 $html = '';
4947
5048 $warn_bold = Xml::tags(
Index: trunk/extensions/LiquidThreads/pages/SpecialMoveThread.php
@@ -6,7 +6,6 @@
77 * @see SpecialPage::getDescription
88 */
99 function getDescription() {
10 - wfLoadExtensionMessages( 'LiquidThreads' );
1110 return wfMsg( 'lqt_movethread' );
1211 }
1312
@@ -27,7 +26,6 @@
2827 function getPageName() { return 'MoveThread'; }
2928
3029 function getSubmitText() {
31 - wfLoadExtensionMessages( 'LiquidThreads' );
3230 return wfMsg( 'lqt_move_move' );
3331 }
3432
Index: trunk/extensions/LiquidThreads/pages/ThreadActionPage.php
@@ -19,8 +19,6 @@
2020 protected function getRightRequirement() { return ''; }
2121
2222 function execute( $par ) {
23 - wfLoadExtensionMessages( 'LiquidThreads' );
24 -
2523 global $wgOut, $wgUser;
2624
2725 if ( !$this->userCanExecute( $wgUser ) ) {
@@ -44,7 +42,6 @@
4543 // Handle parameter
4644 $this->mTarget = $par;
4745 if ( $par === null || $par === "" ) {
48 - wfLoadExtensionMessages( 'LiquidThreads' );
4946 $this->output->addHTML( wfMsg( 'lqt_threadrequired' ) );
5047 return false;
5148 }
Index: trunk/extensions/LiquidThreads/pages/ThreadHistoricalRevisionView.php
@@ -46,7 +46,6 @@
4747
4848 function showHistoryInfo() {
4949 global $wgLang;
50 - wfLoadExtensionMessages( 'LiquidThreads' );
5150
5251 $html = wfMsgExt(
5352 'lqt_revision_as_of',
Index: trunk/extensions/LiquidThreads/pages/TalkpageHistoryView.php
@@ -5,8 +5,6 @@
66 function show() {
77 global $wgUser;
88
9 - wfLoadExtensionMessages( 'LiquidThreads' );
10 -
119 $sk = $wgUser->getSkin();
1210
1311 $talkpageTitle = $this->article->getTitle();
Index: trunk/extensions/LiquidThreads/pages/ThreadPermalinkView.php
@@ -13,8 +13,6 @@
1414 }
1515
1616 static function customizeThreadTabs( $skintemplate, &$content_actions, $view ) {
17 - wfLoadExtensionMessages( 'LiquidThreads' );
18 -
1917 if ( !$view->thread ) {
2018 return true;
2119 }
@@ -135,19 +133,15 @@
136134 }
137135
138136 function noSuchRevision() {
139 - wfLoadExtensionMessages( 'LiquidThreads' );
140137 $this->output->addWikiMsg( 'lqt_nosuchrevision' );
141138 }
142139
143140 function showMissingThreadPage() {
144 - wfLoadExtensionMessages( 'LiquidThreads' );
145141 $this->output->setPageTitle( wfMsg( 'lqt_nosuchthread_title' ) );
146142 $this->output->addWikiMsg( 'lqt_nosuchthread' );
147143 }
148144
149145 function getSubtitle() {
150 - wfLoadExtensionMessages( 'LiquidThreads' );
151 -
152146 $sk = $this->user->getSkin();
153147 $fragment = '#' . $this->anchorName( $this->thread );
154148
Index: trunk/extensions/LiquidThreads/pages/NewUserMessagesView.php
@@ -8,8 +8,8 @@
99 protected function htmlForReadButton( $label, $title, $class, $ids ) {
1010 $ids_s = implode( ',', $ids );
1111 $html = '';
12 - $html .= Xml::hidden( 'lqt_method', 'mark_as_read' );
13 - $html .= Xml::hidden( 'lqt_operand', $ids_s );
 12+ $html .= Html::hidden( 'lqt_method', 'mark_as_read' );
 13+ $html .= Html::hidden( 'lqt_operand', $ids_s );
1414 $html .= Xml::submitButton(
1515 $label,
1616 array(
@@ -24,7 +24,6 @@
2525 }
2626
2727 function getReadAllButton( ) {
28 - wfLoadExtensionMessages( 'LiquidThreads' );
2928 return $this->htmlForReadButton(
3029 wfMsg( 'lqt-read-all' ),
3130 wfMsg( 'lqt-read-all-tooltip' ),
@@ -34,7 +33,6 @@
3534 }
3635
3736 function getUndoButton( $ids ) {
38 - wfLoadExtensionMessages( 'LiquidThreads' );
3937
4038 if ( count( $ids ) == 1 ) {
4139 $t = Threads::withId( $ids[0] );
@@ -49,8 +47,8 @@
5048
5149 $html = '';
5250 $html .= $msg;
53 - $html .= Xml::hidden( 'lqt_method', 'mark_as_unread' );
54 - $html .= Xml::hidden( 'lqt_operand', $operand );
 51+ $html .= Html::hidden( 'lqt_method', 'mark_as_unread' );
 52+ $html .= Html::hidden( 'lqt_operand', $operand );
5553 $html .= Xml::submitButton(
5654 wfMsg( 'lqt-email-undo' ),
5755 array(
Index: trunk/extensions/LiquidThreads/pages/SpecialHotTopics.php
@@ -7,8 +7,6 @@
88 function execute( $par ) {
99 global $wgOut;
1010
11 - wfLoadExtensionMessages( 'LiquidThreads' );
12 -
1311 $this->setHeaders();
1412
1513 $wgOut->setPageTitle( wfMsg( 'lqt-hot-topics' ) );
Index: trunk/extensions/LiquidThreads/pages/ThreadHistoryListingView.php
@@ -7,7 +7,6 @@
88 $this->showMissingThreadPage();
99 return false;
1010 }
11 - wfLoadExtensionMessages( 'LiquidThreads' );
1211
1312 $this->thread->updateHistory();
1413
Index: trunk/extensions/LiquidThreads/pages/SpecialNewMessages.php
@@ -13,13 +13,11 @@
1414 * @see SpecialPage::getDescription
1515 */
1616 function getDescription() {
17 - wfLoadExtensionMessages( 'LiquidThreads' );
1817 return wfMsg( 'lqt_newmessages-title' );
1918 }
2019
2120 function execute( $par ) {
2221 global $wgOut, $wgRequest, $wgUser;
23 - wfLoadExtensionMessages( 'LiquidThreads' );
2422 $this->user = $wgUser;
2523 $this->output = $wgOut;
2624 $this->request = $wgRequest;
Index: trunk/extensions/LiquidThreads/pages/TalkpageView.php
@@ -61,7 +61,6 @@
6262
6363 $article = new Article( $this->title );
6464
65 - wfLoadExtensionMessages( 'LiquidThreads' );
6665 // If $article_text == "", the talkpage was probably just created
6766 // when the first thread was posted to make the links blue.
6867 if ( $article->exists() ) {
@@ -120,8 +119,6 @@
121120 function getTOC( $threads ) {
122121 global $wgLang;
123122
124 - wfLoadExtensionMessages( 'LiquidThreads' );
125 -
126123 $html = '';
127124
128125 $h2_header = Xml::tags( 'h2', null, wfMsgExt( 'lqt_contents_title', 'parseinline' ) );
@@ -178,7 +175,6 @@
179176 }
180177
181178 function getArchiveWidget( ) {
182 - wfLoadExtensionMessages( 'LiquidThreads' );
183179 $url = $this->talkpageUrl( $this->title, 'talkpage_archive' );
184180
185181 $html = '';
@@ -187,8 +183,6 @@
188184 }
189185
190186 function showTalkpageViewOptions( $article ) {
191 - wfLoadExtensionMessages( 'LiquidThreads' );
192 -
193187 if ( $article->exists() ) {
194188 $form_action_url = $this->talkpageUrl( $this->title, 'talkpage_sort_order' );
195189 $html = '';
@@ -214,7 +208,7 @@
215209 $html .= $sortOrderSelect->getHTML();
216210
217211 $html .= Xml::submitButton( wfMsg( 'go' ), array( 'class' => 'lqt_go_sort' ) );
218 - $html .= Xml::hidden( 'title', $this->title->getPrefixedText() );
 212+ $html .= Html::hidden( 'title', $this->title->getPrefixedText() );
219213
220214
221215 $html = Xml::tags(
@@ -233,7 +227,6 @@
234228 }
235229
236230 function show() {
237 - wfLoadExtensionMessages( 'LiquidThreads' );
238231 LqtView::addJSandCSS();
239232
240233 $this->output->setPageTitle( $this->title->getPrefixedText() );
@@ -366,7 +359,7 @@
367360 );
368361
369362 $html .= ' ' . Xml::submitButton( wfMsg( 'lqt-search-button' ) );
370 - $html .= Xml::hidden( 'title', $this->title->getPrefixedText() );
 363+ $html .= Html::hidden( 'title', $this->title->getPrefixedText() );
371364 $html = Xml::tags(
372365 'form',
373366 array(
Index: trunk/extensions/LiquidThreads/pages/SpecialSplitThread.php
@@ -26,7 +26,6 @@
2727 * @see SpecialPage::getDescription
2828 */
2929 function getDescription() {
30 - wfLoadExtensionMessages( 'LiquidThreads' );
3130 return wfMsg( 'lqt_split_thread' );
3231 }
3332
@@ -70,7 +69,6 @@
7170 }
7271
7372 function getSubmitText() {
74 - wfLoadExtensionMessages( 'LiquidThreads' );
7573 return wfMsg( 'lqt-split-submit' );
7674 }
7775 }
Index: trunk/extensions/LiquidThreads/pages/SummaryPageView.php
@@ -3,7 +3,6 @@
44
55 class SummaryPageView extends LqtView {
66 function show() {
7 - wfLoadExtensionMessages( 'LiquidThreads' );
87 $thread = Threads::withSummary( $this->article );
98 if ( $thread && $thread->root() ) {
109 global $wgUser;
Index: trunk/extensions/LiquidThreads/pages/SpecialMergeThread.php
@@ -61,7 +61,7 @@
6262 $threadid = $t->id();
6363 }
6464
65 - $out = Xml::hidden( $field, $threadid );
 65+ $out = Html::hidden( $field, $threadid );
6666 $out .= LqtView::permalink( $t );
6767
6868 return $out;
@@ -71,7 +71,6 @@
7272 * @see SpecialPage::getDescription
7373 */
7474 function getDescription() {
75 - wfLoadExtensionMessages( 'LiquidThreads' );
7675 return wfMsg( 'lqt_merge_thread' );
7776 }
7877
@@ -98,7 +97,6 @@
9998 }
10099
101100 function getSubmitText() {
102 - wfLoadExtensionMessages( 'LiquidThreads' );
103101 return wfMsg( 'lqt-merge-submit' );
104102 }
105103 }
Index: trunk/extensions/LiquidThreads/api/ApiFeedLQTThreads.php
@@ -109,7 +109,6 @@
110110 }
111111
112112 public static function createFeedTitle( $params ) {
113 - wfLoadExtensionMessages( 'LiquidThreads' );
114113 $fromPlaces = array();
115114
116115 foreach ( (array)$params['thread'] as $thread ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r75520Kill some unused variables. Fix minor typo from r75515reedy11:43, 27 October 2010

Status & tagging log