Enable users to watch category membership changes
[lhc/web/wiklou.git] / includes / changes / EnhancedChangesList.php
index e5916bd..a1e9d28 100644 (file)
@@ -364,6 +364,8 @@ class EnhancedChangesList extends ChangesList {
 
                        if ( $rcObj->mAttribs['rc_type'] == RC_LOG ) {
                                $data['logEntry'] = $this->insertLogEntry( $rcObj );
+                       } elseif ( $this->isCategorizationWithoutRevision( $rcObj ) ) {
+                               $data['comment'] = $this->insertComment( $rcObj );
                        } else {
                                # User links
                                $data['userLink'] = $rcObj->userlink;
@@ -566,15 +568,9 @@ class EnhancedChangesList extends ChangesList {
                }
 
                # Diff and hist links
-               if ( $type != RC_LOG ) {
+               if ( intval( $type ) !== RC_LOG && intval( $type ) !== RC_CATEGORIZE ) {
                        $query['action'] = 'history';
-                       $data['historyLink'] = ' ' . $this->msg( 'parentheses' )
-                               ->rawParams( $rcObj->difflink . $this->message['pipe-separator'] . Linker::linkKnown(
-                                       $rcObj->getTitle(),
-                                       $this->message['hist'],
-                                       array(),
-                                       $query
-                               ) )->escaped();
+                       $data['historyLink'] = $this->getDiffHistLinks( $rcObj, $query );
                }
                $data['separatorAfterLinks'] = ' <span class="mw-changeslist-separator">. .</span> ';
 
@@ -589,10 +585,15 @@ class EnhancedChangesList extends ChangesList {
 
                if ( $type == RC_LOG ) {
                        $data['logEntry'] = $this->insertLogEntry( $rcObj );
+               } elseif ( $this->isCategorizationWithoutRevision( $rcObj ) ) {
+                       $data['comment'] = $this->insertComment( $rcObj );
                } else {
                        $data['userLink'] = $rcObj->userlink;
                        $data['userTalkLink'] = $rcObj->usertalklink;
                        $data['comment'] = $this->insertComment( $rcObj );
+                       if ( intval( $type ) === RC_CATEGORIZE ) {
+                               $data['historyLink'] = $this->getDiffHistLinks( $rcObj, $query );
+                       }
                        $data['rollback'] = $this->getRollback( $rcObj );
                }