Index: trunk/phase3/includes/ChangesList.php |
— | — | @@ -367,6 +367,20 @@ |
368 | 368 | return $formatter->getActionText() . " $mark" . $formatter->getComment(); |
369 | 369 | } |
370 | 370 | |
| 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 | + |
371 | 385 | /** |
372 | 386 | * Check whether to enable recent changes patrol features |
373 | 387 | * @return Boolean |
— | — | @@ -544,6 +558,7 @@ |
545 | 559 | $this->insertUserRelatedLinks( $s, $rc ); |
546 | 560 | # LTR/RTL direction mark |
547 | 561 | $s .= $this->getLang()->getDirMark(); |
| 562 | + $s .= $this->insertComment( $rc ); |
548 | 563 | } |
549 | 564 | |
550 | 565 | # Tags |
— | — | @@ -994,6 +1009,7 @@ |
995 | 1010 | # User links |
996 | 1011 | $r .= $rcObj->userlink; |
997 | 1012 | $r .= $rcObj->usertalklink; |
| 1013 | + $r .= $this->insertComment( $rcObj ); |
998 | 1014 | } |
999 | 1015 | |
1000 | 1016 | # Rollback |
— | — | @@ -1120,6 +1136,8 @@ |
1121 | 1137 | $r .= $this->insertLogEntry( $rcObj ); |
1122 | 1138 | } else { |
1123 | 1139 | $r .= ' '.$rcObj->userlink . $rcObj->usertalklink; |
| 1140 | + $r .= $this->insertComment( $rcObj ); |
| 1141 | + $r .= $this->insertRollback( $r, $rcObj ); |
1124 | 1142 | } |
1125 | 1143 | |
1126 | 1144 | # Tags |