http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97478

Revision: 97478
Author:   nikerabbit
Date:     2011-09-19 12:36:58 +0000 (Mon, 19 Sep 2011)
Log Message:
-----------
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: trunk/phase3/includes/ChangesList.php
===================================================================
--- trunk/phase3/includes/ChangesList.php       2011-09-19 12:18:36 UTC (rev 
97477)
+++ trunk/phase3/includes/ChangesList.php       2011-09-19 12:36:58 UTC (rev 
97478)
@@ -367,6 +367,20 @@
                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 ' <span class="history-deleted">' . 
wfMsgHtml( 'rev-deleted-comment' ) . '</span>';
+                       } else {
+                               return Linker::commentBlock( 
$rc->mAttribs['rc_comment'], $rc->getTitle() );
+                       }
+               }
+       }
+
        /**
         * Check whether to enable recent changes patrol features
         * @return Boolean
@@ -544,6 +558,7 @@
                        $this->insertUserRelatedLinks( $s, $rc );
                        # LTR/RTL direction mark
                        $s .= $this->getLang()->getDirMark();
+                       $s .= $this->insertComment( $rc );
                }
 
                # Tags
@@ -994,6 +1009,7 @@
                                # User links
                                $r .= $rcObj->userlink;
                                $r .= $rcObj->usertalklink;
+                               $r .= $this->insertComment( $rcObj );
                        }
 
                        # Rollback
@@ -1120,6 +1136,8 @@
                        $r .= $this->insertLogEntry( $rcObj );
                } else { 
                        $r .= ' '.$rcObj->userlink . $rcObj->usertalklink;
+                       $r .= $this->insertComment( $rcObj );
+                       $r .= $this->insertRollback( $r, $rcObj );
                }
 
                # Tags


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to