jenkins-bot has submitted this change and it was merged.
Change subject: Special:RC filter: hidehumans
......................................................................
Special:RC filter: hidehumans
Allows showing only bot edits
Will be used by the ERI project.
Bug: T149862
Change-Id: I748eb3c614abd7b8b228efe3da5e9cb569a8618f
---
M includes/specialpage/ChangesListSpecialPage.php
M tests/phpunit/includes/specials/SpecialRecentchangesTest.php
2 files changed, 18 insertions(+), 0 deletions(-)
Approvals:
Catrope: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/specialpage/ChangesListSpecialPage.php
b/includes/specialpage/ChangesListSpecialPage.php
index c1c1685..5add448 100644
--- a/includes/specialpage/ChangesListSpecialPage.php
+++ b/includes/specialpage/ChangesListSpecialPage.php
@@ -141,6 +141,7 @@
$opts->add( 'hideminor', false );
$opts->add( 'hidebots', false );
+ $opts->add( 'hidehumans', false );
$opts->add( 'hideanons', false );
$opts->add( 'hideliu', false );
$opts->add( 'hidepatrolled', false );
@@ -238,6 +239,9 @@
if ( $opts['hidebots'] ) {
$conds['rc_bot'] = 0;
}
+ if ( $opts['hidehumans'] ) {
+ $conds[] = 'rc_bot = 1';
+ }
if ( $user->useRCPatrol() && $opts['hidepatrolled'] ) {
$conds['rc_patrolled'] = 0;
}
diff --git a/tests/phpunit/includes/specials/SpecialRecentchangesTest.php
b/tests/phpunit/includes/specials/SpecialRecentchangesTest.php
index 388e2fd..0cd1b34 100644
--- a/tests/phpunit/includes/specials/SpecialRecentchangesTest.php
+++ b/tests/phpunit/includes/specials/SpecialRecentchangesTest.php
@@ -267,4 +267,18 @@
"rc conditions: hidelog=1"
);
}
+
+ public function testRcHidehumans() {
+ $this->assertConditions(
+ [ # expected
+ 'rc_bot' => 1,
+ "rc_type != '6'",
+ ],
+ [
+ 'hidebots' => 0,
+ 'hidehumans' => 1,
+ ],
+ "rc conditions: hidebots=0 hidehumans=1"
+ );
+ }
}
--
To view, visit https://gerrit.wikimedia.org/r/321479
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I748eb3c614abd7b8b228efe3da5e9cb569a8618f
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Sbisson <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Mattflaschen <[email protected]>
Gerrit-Reviewer: Mooeypoo <[email protected]>
Gerrit-Reviewer: Sbisson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits