From 1ab671e626dfa3cf544fef68cd9c590293664854 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sat, 1 Dec 2012 20:51:09 +0100 Subject: [PATCH] (bug 37263) better handling of minor/bot in enhanced changelist It makes more sense, to have the whole group as minor/bot, when all of the group are minor or bot edits, not when only one of the group is minor/bot. Change-Id: I62bf1099f2e3fb73e9b50374cbb7ba8bfd8a009e --- includes/ChangesList.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/includes/ChangesList.php b/includes/ChangesList.php index 6b7e99c4d4..9ca64c5b6a 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -862,6 +862,8 @@ class EnhancedChangesList extends ChangesList { # Other properties $unpatrolled = false; $isnew = false; + $allBots = true; + $allMinors = true; $curId = $currentRevision = 0; # Some catalyst variables... $namehidden = true; @@ -895,7 +897,13 @@ class EnhancedChangesList extends ChangesList { $currentRevision = $rcObj->mAttribs['rc_this_oldid']; } - $bot = $rcObj->mAttribs['rc_bot']; + if( !$rcObj->mAttribs['rc_bot'] ) { + $allBots = false; + } + if( !$rcObj->mAttribs['rc_minor'] ) { + $allMinors = false; + } + $userlinks[$u]++; } @@ -922,10 +930,10 @@ class EnhancedChangesList extends ChangesList { # Main line $r .= '' . $this->recentChangesFlags( array( - 'newpage' => $isnew, - 'minor' => false, - 'unpatrolled' => $unpatrolled, - 'bot' => $bot , + 'newpage' => $isnew, # show, when one have this flag + 'minor' => $allMinors, # show only, when all have this flag + 'unpatrolled' => $unpatrolled, # show, when one have this flag + 'bot' => $allBots, # show only, when all have this flag ) ); # Timestamp -- 2.20.1