r97478 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97477‎ | r97478 | r97479 >
Date:12:36, 19 September 2011
Author:nikerabbit
Status:ok
Tags:
Comment:
My changes in r96548 were too radical, stripping of edit commits (oops!) and rollback links on some places.
Modified paths:
  • /trunk/phase3/includes/ChangesList.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ChangesList.php
@@ -367,6 +367,20 @@
368368 return $formatter->getActionText() . " $mark" . $formatter->getComment();
369369 }
370370
 371+ /**
 372+ * Insert a formatted comment
 373+ * @param $rc RecentChange
 374+ */
 375+ public function insertComment( $rc ) {
 376+ if( $rc->mAttribs['rc_type'] != RC_MOVE && $rc->mAttribs['rc_type'] != RC_MOVE_OVER_REDIRECT ) {
 377+ if( $this->isDeleted( $rc, Revision::DELETED_COMMENT ) ) {
 378+ return ' <span class="history-deleted">' . wfMsgHtml( 'rev-deleted-comment' ) . '</span>';
 379+ } else {
 380+ return Linker::commentBlock( $rc->mAttribs['rc_comment'], $rc->getTitle() );
 381+ }
 382+ }
 383+ }
 384+
371385 /**
372386 * Check whether to enable recent changes patrol features
373387 * @return Boolean
@@ -544,6 +558,7 @@
545559 $this->insertUserRelatedLinks( $s, $rc );
546560 # LTR/RTL direction mark
547561 $s .= $this->getLang()->getDirMark();
 562+ $s .= $this->insertComment( $rc );
548563 }
549564
550565 # Tags
@@ -994,6 +1009,7 @@
9951010 # User links
9961011 $r .= $rcObj->userlink;
9971012 $r .= $rcObj->usertalklink;
 1013+ $r .= $this->insertComment( $rcObj );
9981014 }
9991015
10001016 # Rollback
@@ -1120,6 +1136,8 @@
11211137 $r .= $this->insertLogEntry( $rcObj );
11221138 } else {
11231139 $r .= ' '.$rcObj->userlink . $rcObj->usertalklink;
 1140+ $r .= $this->insertComment( $rcObj );
 1141+ $r .= $this->insertRollback( $r, $rcObj );
11241142 }
11251143
11261144 # Tags

Sign-offs

UserFlagDate
Gboyerstested14:02, 19 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r96548Update ChangesList and derivatives to use LogFormatter....nikerabbit09:15, 8 September 2011

Status & tagging log