From: Niklas Laxström Date: Mon, 19 Sep 2011 12:36:58 +0000 (+0000) Subject: My changes in r96548 were too radical, stripping of edit commits (oops!) and rollback... X-Git-Tag: 1.31.0-rc.0~27563 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_del%27%2C%20idvote=vote.voteid%29%20%7D%7D?a=commitdiff_plain;h=175cdae6878253db76e14b2b395cb1636db0082b;p=lhc%2Fweb%2Fwiklou.git My changes in r96548 were too radical, stripping of edit commits (oops!) and rollback links on some places. --- diff --git a/includes/ChangesList.php b/includes/ChangesList.php index fe40cd49d6..9967dcc406 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -367,6 +367,20 @@ class ChangesList extends ContextSource { return $formatter->getActionText() . " $mark" . $formatter->getComment(); } + /** + * Insert a formatted comment + * @param $rc RecentChange + */ + public function insertComment( $rc ) { + if( $rc->mAttribs['rc_type'] != RC_MOVE && $rc->mAttribs['rc_type'] != RC_MOVE_OVER_REDIRECT ) { + if( $this->isDeleted( $rc, Revision::DELETED_COMMENT ) ) { + return ' ' . wfMsgHtml( 'rev-deleted-comment' ) . ''; + } else { + return Linker::commentBlock( $rc->mAttribs['rc_comment'], $rc->getTitle() ); + } + } + } + /** * Check whether to enable recent changes patrol features * @return Boolean @@ -544,6 +558,7 @@ class OldChangesList extends ChangesList { $this->insertUserRelatedLinks( $s, $rc ); # LTR/RTL direction mark $s .= $this->getLang()->getDirMark(); + $s .= $this->insertComment( $rc ); } # Tags @@ -994,6 +1009,7 @@ class EnhancedChangesList extends ChangesList { # User links $r .= $rcObj->userlink; $r .= $rcObj->usertalklink; + $r .= $this->insertComment( $rcObj ); } # Rollback @@ -1120,6 +1136,8 @@ class EnhancedChangesList extends ChangesList { $r .= $this->insertLogEntry( $rcObj ); } else { $r .= ' '.$rcObj->userlink . $rcObj->usertalklink; + $r .= $this->insertComment( $rcObj ); + $r .= $this->insertRollback( $r, $rcObj ); } # Tags