From: umherirrender Date: Sat, 1 Dec 2012 19:51:09 +0000 (+0100) Subject: (bug 37263) better handling of minor/bot in enhanced changelist X-Git-Tag: 1.31.0-rc.0~21423^2 X-Git-Url: http://git.cyclocoop.org/%27%20.%20%24prefix%20.%20Wiki::transformTitleToURI%28%24matches%5B1%5D%29%20.%20%27?a=commitdiff_plain;h=1ab671e626dfa3cf544fef68cd9c590293664854;p=lhc%2Fweb%2Fwiklou.git (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 --- 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