r26138 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r26137‎ | r26138 | r26139 >
Date:22:58, 25 September 2007
Author:david
Status:old
Tags:
Comment:
Fixed a regression related to moving. Renamed history-type msg names to include _hist_.
Modified paths:
  • /branches/liquidthreads/extensions/LqtI18N.php (modified) (history)
  • /branches/liquidthreads/extensions/LqtModel.php (modified) (history)
  • /branches/liquidthreads/extensions/LqtPages.php (modified) (history)

Diff [purge]

Index: branches/liquidthreads/extensions/LqtI18N.php
@@ -33,12 +33,13 @@
3434 'lqt_fragment'=>'a fragment of a $1 from $2',
3535 'lqt_discussion_link'=>'discussion', // substituted above
3636 'lqt_from_talk'=>'from $1',
37 - 'lqt_comment_edited'=>'Comment text edited',
38 - 'lqt_summary_changed'=>'Summary changed',
39 - 'lqt_reply_created'=>'New reply created',
40 - 'lqt_thread_created'=>'New thread created',
41 - 'lqt_deleted'=>'Deleted',
42 - 'lqt_undeleted'=>'Undeleted',
 37+ 'lqt_hist_comment_edited'=>'Comment text edited',
 38+ 'lqt_hist_summary_changed'=>'Summary changed',
 39+ 'lqt_hist_reply_created'=>'New reply created',
 40+ 'lqt_hist_thread_created'=>'New thread created',
 41+ 'lqt_hist_deleted'=>'Deleted',
 42+ 'lqt_hist_undeleted'=>'Undeleted',
 43+ 'lqt_hist_moved_talkpage'=>'Moved',
4344 'lqt_history_subtitle'=>'Viewing a history listing.',
4445 );
4546
Index: branches/liquidthreads/extensions/LqtPages.php
@@ -535,12 +535,13 @@
536536 /* TODO: best not to refer to LqtView class directly. */
537537 /* We don't use oldid because that has side-effects. */
538538 $result = array();
539 - $change_names = array( Threads::CHANGE_EDITED_ROOT => wfMsg('lqt_comment_edited'),
540 - Threads::CHANGE_EDITED_SUMMARY => wfMsg('lqt_summary_changed'),
541 - Threads::CHANGE_REPLY_CREATED => wfMsg('lqt_reply_created'),
542 - Threads::CHANGE_NEW_THREAD => wfMsg('lqt_thread_created'),
543 - Threads::CHANGE_DELETED => wfMsg('lqt_deleted'),
544 - Threads::CHANGE_UNDELETED => wfMsg('lqt_undeleted'));
 539+ $change_names = array( Threads::CHANGE_EDITED_ROOT => wfMsg('lqt_hist_comment_edited'),
 540+ Threads::CHANGE_EDITED_SUMMARY => wfMsg('lqt_hist_summary_changed'),
 541+ Threads::CHANGE_REPLY_CREATED => wfMsg('lqt_hist_reply_created'),
 542+ Threads::CHANGE_NEW_THREAD => wfMsg('lqt_hist_thread_created'),
 543+ Threads::CHANGE_DELETED => wfMsg('lqt_hist_deleted'),
 544+ Threads::CHANGE_UNDELETED => wfMsg('lqt_hist_undeleted'),
 545+ Threads::CHANGE_MOVED_TALKPAGE => wfMsg('lqt_hist_moved_talkpage'));
545546 $change_label = array_key_exists($t->changeType(), $change_names) ? $change_names[$t->changeType()] : "";
546547
547548 $url = LqtView::permalinkUrlWithQuery( $this->thread, 'lqt_oldid=' . $t->revisionNumber() );
Index: branches/liquidthreads/extensions/LqtModel.php
@@ -376,15 +376,8 @@
377377 function moveToSubjectPage($title, $reason, $leave_trace) {
378378 $dbr =& wfGetDB( DB_MASTER );
379379
380 - if( $title->exists() ) {
381 - $new_articleId = $title->getArticleId();
382 - $new_articleNamespace = null;
383 - $new_articleTitle = null;
384 - } else {
385 - $new_articleId = 0;
386 - $new_articleNamespace = $title->getNamespace();
387 - $new_articleTitle = $title->getDBKey();
388 - }
 380+ $new_articleNamespace = $title->getNamespace();
 381+ $new_articleTitle = $title->getDBKey();
389382
390383 foreach($this->replies as $r) {
391384 $res = $dbr->update( 'thread',
@@ -396,7 +389,6 @@
397390 __METHOD__);
398391 }
399392
400 - $this->articleId = $new_articleId;
401393 $this->articleNamespace = $new_articleNamespace;
402394 $this->articleTitle = $new_articleTitle;
403395 $this->revisionNumber += 1;

Status & tagging log