Adding number of changes info for grouped category changes
authorWMDE-Fisch <christoph.fischer@wikimedia.de>
Thu, 10 Mar 2016 16:48:59 +0000 (17:48 +0100)
committerAddshore <addshorewiki@gmail.com>
Tue, 15 Mar 2016 21:19:17 +0000 (21:19 +0000)
This patch addes the summarized number of category changes
for grouped category changes on the EnhancedChangesList.

Bug: T126849
Change-Id: I3c8ccb2ad6310dac19a724b2ce923c1e67e588be

includes/changes/EnhancedChangesList.php

index 4a028bb..946c6d1 100644 (file)
@@ -503,10 +503,11 @@ class EnhancedChangesList extends ChangesList {
                /** @var $block0 RecentChange */
                $block0 = $block[0];
                $last = $block[count( $block ) - 1];
-               if ( !$allLogs && $rcObj->mAttribs['rc_type'] != RC_CATEGORIZE ) {
-                       if ( !ChangesList::userCan( $rcObj, Revision::DELETED_TEXT, $this->getUser() ) ) {
-                               $links['total-changes'] = $nchanges[$n];
-                       } elseif ( $isnew ) {
+               if ( !$allLogs ) {
+                       if ( !ChangesList::userCan( $rcObj, Revision::DELETED_TEXT, $this->getUser() ) ||
+                               $isnew ||
+                               $rcObj->mAttribs['rc_type'] == RC_CATEGORIZE
+                       ) {
                                $links['total-changes'] = $nchanges[$n];
                        } else {
                                $links['total-changes'] = Linker::link(