r45457 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45456‎ | r45457 | r45458 >
Date:20:44, 6 January 2009
Author:siebrand
Status:deferred
Tags:
Comment:
* Remove commented out and unused code since r40443.
* Remove unused messages because of r40443
* Remove trailing space in 'lqt_subject'
* Remove some trailing whitespace
Modified paths:
  • /trunk/extensions/LiquidThreads/LiquidThreads.php (modified) (history)
  • /trunk/extensions/LiquidThreads/Lqt.i18n.php (modified) (history)
  • /trunk/extensions/LiquidThreads/LqtBaseView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/LiquidThreads.php
@@ -41,7 +41,6 @@
4242 $wgHooks['SpecialMovepageAfterMove'][] = 'LqtDispatch::onPageMove';
4343 $wgHooks['LinkerMakeLinkObj'][] = 'LqtDispatch::makeLinkObj';
4444 $wgHooks['SkinTemplateTabAction'][] = 'LqtDispatch::tabAction';
45 -//$wgHooks['ChangesListInsertArticleLink'][] = 'LqtDispatch::changesListArticleLink';
4645 $wgHooks['OldChangesListRecentChangesLine'][] = 'LqtDispatch::customizeOldChangesList';
4746 $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'LqtDispatch::setNewtalkHTML';
4847
Index: trunk/extensions/LiquidThreads/Lqt.i18n.php
@@ -56,11 +56,9 @@
5757 'lqt_change_reply_created' => 'The highlighted comment was created in this revision.',
5858 'lqt_change_edited_root' => 'The highlighted comment was edited in this revision.',
5959 'lqt_youhavenewmessages' => 'You have [$1 new messages].',
60 - 'lqt_changes_from' => ' from ',
61 - 'lqt_changes_summary_of' => ' of ',
6260 'lqt_protectedfromreply' => 'This thread has been $1 from being replied to.',
6361 'lqt_protectedfromreply_link' => 'protected',
64 - 'lqt_subject' => 'Subject: ',
 62+ 'lqt_subject' => 'Subject:',
6563 'lqt_nosubject' => '«no subject»',
6664 'lqt_noreason' => 'No reason given.',
6765 'lqt_move_placeholder' => 'This thread is a placeholder indicating that a thread, $1, was removed from this page to another talk page.
@@ -2762,7 +2760,7 @@
27632761 'lqt_new_thread' => 'Start ein ny diskusjon',
27642762 'lqt_in_response_to' => 'Som svar til $1 av $2, over:',
27652763 'lqt_edited_notice' => 'Endra',
2766 - 'lqt_move_placeholder' => 'Denne tråden finst berre for å syna at tråden $1 vart flytt frå denne sida til ei anna diskusjonssida.
 2764+ 'lqt_move_placeholder' => 'Denne tråden finst berre for å syna at tråden $1 vart flytt frå denne sida til ei anna diskusjonssida.
27672765 Flyttinga vart gjort av $2 $3.',
27682766 'lqt_reply' => 'Svar',
27692767 'lqt_delete' => 'Slett',
Index: trunk/extensions/LiquidThreads/LqtBaseView.php
@@ -174,47 +174,14 @@
175175 return true;
176176 }
177177
178 - static function changesListArticleLink(&$changeslist, &$articlelink, &$s, &$rc, $unpatrolled, $watched) {
179 - $thread = null;
180 -
181 - /* What an utter crock of shit.
182 - The first row for a given date has the date plus the <ul> tag inside what's
183 - supposed to be the individual row HTML, $s. */
184 -
185 -/* var_dump($s);
186 - $articlelink = '<span style="color:orange;">Yo</span>';
187 - return true;*/
188 -
189 - if( $rc->getTitle()->getNamespace() == NS_LQT_THREAD ) {
190 - $thread = Threads::withRoot(new Post( $rc->getTitle() ));
191 - if($thread) {
192 - wfLoadExtensionMessages( 'LiquidThreads' );
193 - $msg = wfMsg('lqt_changes_from');
194 - $link = $thread->article()->getTitle()->getTalkPage();
195 - }
196 - }
197 - else if( $rc->getTitle()->getNamespace() == NS_LQT_SUMMARY ) {
198 - $thread = Threads::withSummary(new Article( $rc->getTitle() ));
199 - if($thread) {
200 - wfLoadExtensionMessages( 'LiquidThreads' );
201 - $msg = wfMsg('lqt_changes_summary_of');
202 - $link = $thread->title();
203 - }
204 - }
205 - if($thread) {
206 - $articlelink .= $msg . $changeslist->skin->makeKnownLinkObj( $link );
207 - }
208 - return true;
209 - }
210 -
211178 static function customizeOldChangesList(&$changeslist, &$s, &$rc) {
212179 if( $rc->getTitle()->getNamespace() == NS_LQT_THREAD ) {
213180 $thread = Threads::withRoot(new Post( $rc->getTitle() ));
214181 if( !$thread ) return true;
215 -
 182+
216183 LqtView::addJSandCSS(); // TODO only do this once.
217184 wfLoadExtensionMessages( 'LiquidThreads' );
218 -
 185+
219186 if( $rc->mAttribs['rc_type'] != RC_NEW ) {
220187 // Add whether it was original author.
221188 // TODO: this only asks whether ANY edit has been by another, not this edit.
@@ -239,7 +206,7 @@
240207 array('class'=>'lqt_rc_ellipsis'), array(), array('known'));
241208 }
242209 // TODO we must parse or sanitize the quote.
243 -
 210+
244211 if( $thread->isTopmostThread() ) {
245212 $message_name = 'lqt_rc_new_discussion';
246213 $tmp_title = $thread->title();
@@ -248,17 +215,17 @@
249216 $tmp_title = $thread->topmostThread()->title();
250217 $tmp_title->setFragment( '#' . LqtView::anchorName( $thread ) );
251218 }
252 -
 219+
253220 $thread_link = $changeslist->skin->link(
254221 $tmp_title,
255222 $thread->subjectWithoutIncrement(),
256223 array(), array(), array('known'));
257 -
 224+
258225 $talkpage_link = $changeslist->skin->link(
259226 $thread->article()->getTitle()->getTalkPage(),
260 - null,
 227+ null,
261228 array(), array(), array('known'));
262 -
 229+
263230 $s = wfMsg($message_name, $thread_link, $talkpage_link, $sig)
264231 . "<blockquote class=\"lqt_rc_blockquote\">$quote</blockquote>";
265232 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r40443Customize RC entries for new threads and replies. Relies on recent HEAD.david18:22, 4 September 2008

Status & tagging log