3 use Wikimedia\TestingAccessWrapper
;
6 * Test class for ChangesListSpecialPage class
8 * Copyright © 2011-, Antoine Musso, Stephane Bisson, Matthew Flaschen
10 * @author Antoine Musso
11 * @author Stephane Bisson
12 * @author Matthew Flaschen
15 * @covers ChangesListSpecialPage
17 class ChangesListSpecialPageTest
extends AbstractChangesListSpecialPageTestCase
{
18 protected function getPage() {
19 $mock = $this->getMockBuilder( ChangesListSpecialPage
::class )
22 'ChangesListSpecialPage',
26 ->setMethods( [ 'getPageTitle' ] )
27 ->getMockForAbstractClass();
29 $mock->method( 'getPageTitle' )->willReturn(
30 Title
::makeTitle( NS_SPECIAL
, 'ChangesListSpecialPage' )
33 $mock = TestingAccessWrapper
::newFromObject(
40 private function buildQuery(
41 $requestOptions = null,
44 $context = new RequestContext
;
45 $context->setRequest( new FauxRequest( $requestOptions ) );
47 $context->setUser( $user );
50 $this->changesListSpecialPage
->setContext( $context );
51 $this->changesListSpecialPage
->filterGroups
= [];
52 $formOptions = $this->changesListSpecialPage
->setup( null );
54 # Filter out rc_timestamp conditions which depends on the test runtime
55 # This condition is not needed as of march 2, 2011 -- hashar
56 # @todo FIXME: Find a way to generate the correct rc_timestamp
60 $queryConditions = [];
65 [ $this->changesListSpecialPage
, 'buildQuery' ],
76 $queryConditions = array_filter(
78 'ChangesListSpecialPageTest::filterOutRcTimestampCondition'
81 return $queryConditions;
84 /** helper to test SpecialRecentchanges::buildQuery() */
85 private function assertConditions(
87 $requestOptions = null,
91 $queryConditions = $this->buildQuery( $requestOptions, $user );
94 self
::normalizeCondition( $expected ),
95 self
::normalizeCondition( $queryConditions ),
100 private static function normalizeCondition( $conds ) {
101 $dbr = wfGetDB( DB_REPLICA
);
102 $normalized = array_map(
103 function ( $k, $v ) use ( $dbr ) {
104 if ( is_array( $v ) ) {
107 // (Ab)use makeList() to format only this entry
108 return $dbr->makeList( [ $k => $v ], Database
::LIST_AND
);
110 array_keys( $conds ),
117 /** return false if condition begins with 'rc_timestamp ' */
118 private static function filterOutRcTimestampCondition( $var ) {
119 return ( is_array( $var ) ||
strpos( $var, 'rc_timestamp ' ) === false );
122 public function testRcNsFilter() {
123 $this->assertConditions(
125 "rc_namespace = '0'",
128 'namespace' => NS_MAIN
,
130 "rc conditions with one namespace"
134 public function testRcNsFilterInversion() {
135 $this->assertConditions(
137 "rc_namespace != '0'",
140 'namespace' => NS_MAIN
,
143 "rc conditions with namespace inverted"
147 public function testRcNsFilterMultiple() {
148 $this->assertConditions(
150 "rc_namespace IN ('1','2','3')",
153 'namespace' => '1;2;3',
155 "rc conditions with multiple namespaces"
159 public function testRcNsFilterMultipleAssociated() {
160 $this->assertConditions(
162 "rc_namespace IN ('0','1','4','5','6','7')",
165 'namespace' => '1;4;7',
168 "rc conditions with multiple namespaces and associated"
172 public function testRcNsFilterAssociatedSpecial() {
173 $this->assertConditions(
175 "rc_namespace IN ('-1','0','1')",
178 'namespace' => '1;-1',
181 "rc conditions with associated and special namespace"
185 public function testRcNsFilterMultipleAssociatedInvert() {
186 $this->assertConditions(
188 "rc_namespace NOT IN ('2','3','8','9')",
191 'namespace' => '2;3;9',
195 "rc conditions with multiple namespaces, associated and inverted"
199 public function testRcNsFilterMultipleInvert() {
200 $this->assertConditions(
202 "rc_namespace NOT IN ('1','2','3')",
205 'namespace' => '1;2;3',
208 "rc conditions with multiple namespaces inverted"
212 public function testRcHidemyselfFilter() {
213 $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW
);
214 $this->overrideMwServices();
216 $user = $this->getTestUser()->getUser();
217 $user->getActorId( wfGetDB( DB_MASTER
) );
218 $this->assertConditions(
220 "NOT((rc_actor = '{$user->getActorId()}'))",
225 "rc conditions: hidemyself=1 (logged in)",
229 $user = User
::newFromName( '10.11.12.13', false );
230 $id = $user->getActorId( wfGetDB( DB_MASTER
) );
231 $this->assertConditions(
233 "NOT((rc_actor = '{$user->getActorId()}'))",
238 "rc conditions: hidemyself=1 (anon)",
243 public function testRcHidemyselfFilter_old() {
245 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
247 $this->overrideMwServices();
249 $user = $this->getTestUser()->getUser();
250 $user->getActorId( wfGetDB( DB_MASTER
) );
251 $this->assertConditions(
253 "NOT((rc_user = '{$user->getId()}'))",
258 "rc conditions: hidemyself=1 (logged in)",
262 $user = User
::newFromName( '10.11.12.13', false );
263 $id = $user->getActorId( wfGetDB( DB_MASTER
) );
264 $this->assertConditions(
266 "NOT((rc_user_text = '10.11.12.13'))",
271 "rc conditions: hidemyself=1 (anon)",
276 public function testRcHidebyothersFilter() {
277 $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW
);
278 $this->overrideMwServices();
280 $user = $this->getTestUser()->getUser();
281 $user->getActorId( wfGetDB( DB_MASTER
) );
282 $this->assertConditions(
284 "(rc_actor = '{$user->getActorId()}')",
289 "rc conditions: hidebyothers=1 (logged in)",
293 $user = User
::newFromName( '10.11.12.13', false );
294 $id = $user->getActorId( wfGetDB( DB_MASTER
) );
295 $this->assertConditions(
297 "(rc_actor = '{$user->getActorId()}')",
302 "rc conditions: hidebyothers=1 (anon)",
307 public function testRcHidebyothersFilter_old() {
309 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
311 $this->overrideMwServices();
313 $user = $this->getTestUser()->getUser();
314 $user->getActorId( wfGetDB( DB_MASTER
) );
315 $this->assertConditions(
317 "(rc_user_text = '{$user->getName()}')",
322 "rc conditions: hidebyothers=1 (logged in)",
326 $user = User
::newFromName( '10.11.12.13', false );
327 $id = $user->getActorId( wfGetDB( DB_MASTER
) );
328 $this->assertConditions(
330 "(rc_user_text = '10.11.12.13')",
335 "rc conditions: hidebyothers=1 (anon)",
340 public function testRcHidepageedits() {
341 $this->assertConditions(
346 'hidepageedits' => 1,
348 "rc conditions: hidepageedits=1"
352 public function testRcHidenewpages() {
353 $this->assertConditions(
360 "rc conditions: hidenewpages=1"
364 public function testRcHidelog() {
365 $this->assertConditions(
372 "rc conditions: hidelog=1"
376 public function testRcHidehumans() {
377 $this->assertConditions(
385 "rc conditions: hidebots=0 hidehumans=1"
389 public function testRcHidepatrolledDisabledFilter() {
390 $this->setMwGlobals( 'wgUseRCPatrol', false );
391 $user = $this->getTestUser()->getUser();
392 $this->assertConditions(
396 'hidepatrolled' => 1,
398 "rc conditions: hidepatrolled=1 (user not allowed)",
403 public function testRcHideunpatrolledDisabledFilter() {
404 $this->setMwGlobals( 'wgUseRCPatrol', false );
405 $user = $this->getTestUser()->getUser();
406 $this->assertConditions(
410 'hideunpatrolled' => 1,
412 "rc conditions: hideunpatrolled=1 (user not allowed)",
417 public function testRcHidepatrolledFilter() {
418 $user = $this->getTestSysop()->getUser();
419 $this->assertConditions(
424 'hidepatrolled' => 1,
426 "rc conditions: hidepatrolled=1",
431 public function testRcHideunpatrolledFilter() {
432 $user = $this->getTestSysop()->getUser();
433 $this->assertConditions(
435 'rc_patrolled' => [ 1, 2 ],
438 'hideunpatrolled' => 1,
440 "rc conditions: hideunpatrolled=1",
445 public function testRcReviewStatusFilter() {
446 $user = $this->getTestSysop()->getUser();
447 $this->assertConditions(
452 'reviewStatus' => 'manual'
454 "rc conditions: reviewStatus=manual",
457 $this->assertConditions(
459 'rc_patrolled' => [ 0, 2 ],
462 'reviewStatus' => 'unpatrolled;auto'
464 "rc conditions: reviewStatus=unpatrolled;auto",
469 public function testRcHideminorFilter() {
470 $this->assertConditions(
477 "rc conditions: hideminor=1"
481 public function testRcHidemajorFilter() {
482 $this->assertConditions(
489 "rc conditions: hidemajor=1"
493 public function testHideCategorization() {
494 $this->assertConditions(
500 'hidecategorization' => 1
502 "rc conditions: hidecategorization=1"
506 public function testFilterUserExpLevelAll() {
507 $this->assertConditions(
512 'userExpLevel' => 'registered;unregistered;newcomer;learner;experienced',
514 "rc conditions: userExpLevel=registered;unregistered;newcomer;learner;experienced"
518 public function testFilterUserExpLevelRegisteredUnregistered() {
519 $this->assertConditions(
524 'userExpLevel' => 'registered;unregistered',
526 "rc conditions: userExpLevel=registered;unregistered"
530 public function testFilterUserExpLevelRegisteredUnregisteredLearner() {
531 $this->assertConditions(
536 'userExpLevel' => 'registered;unregistered;learner',
538 "rc conditions: userExpLevel=registered;unregistered;learner"
542 public function testFilterUserExpLevelAllExperienceLevels() {
543 $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW
);
544 $this->overrideMwServices();
546 $this->assertConditions(
549 'actor_rc_user.actor_user IS NOT NULL',
552 'userExpLevel' => 'newcomer;learner;experienced',
554 "rc conditions: userExpLevel=newcomer;learner;experienced"
558 public function testFilterUserExpLevelAllExperienceLevels_old() {
560 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
562 $this->overrideMwServices();
564 $this->assertConditions(
570 'userExpLevel' => 'newcomer;learner;experienced',
572 "rc conditions: userExpLevel=newcomer;learner;experienced"
576 public function testFilterUserExpLevelRegistrered() {
577 $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW
);
578 $this->overrideMwServices();
580 $this->assertConditions(
583 'actor_rc_user.actor_user IS NOT NULL',
586 'userExpLevel' => 'registered',
588 "rc conditions: userExpLevel=registered"
592 public function testFilterUserExpLevelRegistrered_old() {
594 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
596 $this->overrideMwServices();
598 $this->assertConditions(
604 'userExpLevel' => 'registered',
606 "rc conditions: userExpLevel=registered"
610 public function testFilterUserExpLevelUnregistrered() {
611 $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW
);
612 $this->overrideMwServices();
614 $this->assertConditions(
617 'actor_rc_user.actor_user IS NULL',
620 'userExpLevel' => 'unregistered',
622 "rc conditions: userExpLevel=unregistered"
626 public function testFilterUserExpLevelUnregistrered_old() {
628 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
630 $this->overrideMwServices();
632 $this->assertConditions(
638 'userExpLevel' => 'unregistered',
640 "rc conditions: userExpLevel=unregistered"
644 public function testFilterUserExpLevelRegistreredOrLearner() {
645 $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW
);
646 $this->overrideMwServices();
648 $this->assertConditions(
651 'actor_rc_user.actor_user IS NOT NULL',
654 'userExpLevel' => 'registered;learner',
656 "rc conditions: userExpLevel=registered;learner"
660 public function testFilterUserExpLevelRegistreredOrLearner_old() {
662 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
664 $this->overrideMwServices();
666 $this->assertConditions(
672 'userExpLevel' => 'registered;learner',
674 "rc conditions: userExpLevel=registered;learner"
678 public function testFilterUserExpLevelUnregistreredOrExperienced() {
679 $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW
);
680 $this->overrideMwServices();
682 $conds = $this->buildQuery( [ 'userExpLevel' => 'unregistered;experienced' ] );
685 '/\(actor_rc_user\.actor_user IS NULL\) OR '
686 . '\(\(user_editcount >= 500\) AND \(user_registration <= \'[^\']+\'\)\)/',
688 "rc conditions: userExpLevel=unregistered;experienced"
692 public function testFilterUserExpLevelUnregistreredOrExperienced_old() {
694 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
696 $this->overrideMwServices();
698 $conds = $this->buildQuery( [ 'userExpLevel' => 'unregistered;experienced' ] );
701 '/\(rc_user = 0\) OR '
702 . '\(\(user_editcount >= 500\) AND \(user_registration <= \'[^\']+\'\)\)/',
704 "rc conditions: userExpLevel=unregistered;experienced"
708 public function testFilterUserExpLevel() {
710 $this->setMwGlobals( [
711 'wgLearnerEdits' => 10,
712 'wgLearnerMemberSince' => 4,
713 'wgExperiencedUserEdits' => 500,
714 'wgExperiencedUserMemberSince' => 30,
717 $this->createUsers( [
718 'Newcomer1' => [ 'edits' => 2, 'days' => 2 ],
719 'Newcomer2' => [ 'edits' => 12, 'days' => 3 ],
720 'Newcomer3' => [ 'edits' => 8, 'days' => 5 ],
721 'Learner1' => [ 'edits' => 15, 'days' => 10 ],
722 'Learner2' => [ 'edits' => 450, 'days' => 20 ],
723 'Learner3' => [ 'edits' => 460, 'days' => 33 ],
724 'Learner4' => [ 'edits' => 525, 'days' => 28 ],
725 'Experienced1' => [ 'edits' => 538, 'days' => 33 ],
729 $this->assertArrayEquals(
730 [ 'Newcomer1', 'Newcomer2', 'Newcomer3' ],
731 $this->fetchUsers( [ 'newcomer' ], $now )
734 // newcomers and learner
735 $this->assertArrayEquals(
737 'Newcomer1', 'Newcomer2', 'Newcomer3',
738 'Learner1', 'Learner2', 'Learner3', 'Learner4',
740 $this->fetchUsers( [ 'newcomer', 'learner' ], $now )
743 // newcomers and more learner
744 $this->assertArrayEquals(
746 'Newcomer1', 'Newcomer2', 'Newcomer3',
749 $this->fetchUsers( [ 'newcomer', 'experienced' ], $now )
753 $this->assertArrayEquals(
754 [ 'Learner1', 'Learner2', 'Learner3', 'Learner4' ],
755 $this->fetchUsers( [ 'learner' ], $now )
758 // more experienced only
759 $this->assertArrayEquals(
761 $this->fetchUsers( [ 'experienced' ], $now )
764 // learner and more experienced
765 $this->assertArrayEquals(
767 'Learner1', 'Learner2', 'Learner3', 'Learner4',
770 $this->fetchUsers( [ 'learner', 'experienced' ], $now )
774 private function createUsers( $specs, $now ) {
775 $dbw = wfGetDB( DB_MASTER
);
776 foreach ( $specs as $name => $spec ) {
780 'editcount' => $spec['edits'],
781 'registration' => $dbw->timestamp( $this->daysAgo( $spec['days'], $now ) ),
788 private function fetchUsers( $filters, $now ) {
797 call_user_func_array(
798 [ $this->changesListSpecialPage
, 'filterOnUserExperienceLevel' ],
800 get_class( $this->changesListSpecialPage
),
801 $this->changesListSpecialPage
->getContext(),
802 $this->changesListSpecialPage
->getDB(),
813 // @todo: This is not at all safe or sane. It just blindly assumes
814 // nothing in $conds depends on any other tables.
815 $result = wfGetDB( DB_MASTER
)->select(
818 array_filter( $conds ) +
[ 'user_email' => 'ut' ]
822 foreach ( $result as $row ) {
823 $usernames[] = $row->user_name
;
829 private function daysAgo( $days, $now ) {
830 $secondsPerDay = 86400;
831 return $now - $days * $secondsPerDay;
834 public function testGetStructuredFilterJsData() {
835 $this->changesListSpecialPage
->filterGroups
= [];
839 'name' => 'gub-group',
840 'title' => 'gub-group-title',
841 'class' => ChangesListBooleanFilterGroup
::class,
845 'label' => 'foo-label',
846 'description' => 'foo-description',
848 'showHide' => 'showhidefoo',
853 'label' => 'bar-label',
854 'description' => 'bar-description',
862 'name' => 'des-group',
863 'title' => 'des-group-title',
864 'class' => ChangesListStringOptionsFilterGroup
::class,
865 'isFullCoverage' => true,
869 'label' => 'grault-label',
870 'description' => 'grault-description',
874 'label' => 'garply-label',
875 'description' => 'garply-description',
878 'queryCallable' => function () {
880 'default' => ChangesListStringOptionsFilterGroup
::NONE
,
884 'name' => 'unstructured',
885 'class' => ChangesListBooleanFilterGroup
::class,
888 'name' => 'hidethud',
889 'showHide' => 'showhidethud',
895 'showHide' => 'showhidemos',
903 $this->changesListSpecialPage
->registerFiltersFromDefinitions( $definition );
905 $this->assertArrayEquals(
907 // Filters that only display in the unstructured UI are
908 // are not included, and neither are groups that would
909 // be empty due to the above.
912 'name' => 'gub-group',
913 'title' => 'gub-group-title',
914 'type' => ChangesListBooleanFilterGroup
::TYPE
,
919 'label' => 'bar-label',
920 'description' => 'bar-description',
926 'defaultHighlightColor' => null
930 'label' => 'foo-label',
931 'description' => 'foo-description',
937 'defaultHighlightColor' => null
940 'fullCoverage' => true,
945 'name' => 'des-group',
946 'title' => 'des-group-title',
947 'type' => ChangesListStringOptionsFilterGroup
::TYPE
,
949 'fullCoverage' => true,
953 'label' => 'grault-label',
954 'description' => 'grault-description',
959 'defaultHighlightColor' => null
963 'label' => 'garply-label',
964 'description' => 'garply-description',
969 'defaultHighlightColor' => null
974 'default' => ChangesListStringOptionsFilterGroup
::NONE
,
985 'grault-description',
987 'garply-description',
990 $this->changesListSpecialPage
->getStructuredFilterJsData(),
991 /** ordered= */ false,
996 public function provideParseParameters() {
998 [ 'hidebots', [ 'hidebots' => true ] ],
1000 [ 'bots', [ 'hidebots' => false ] ],
1002 [ 'hideminor', [ 'hideminor' => true ] ],
1004 [ 'minor', [ 'hideminor' => false ] ],
1006 [ 'hidemajor', [ 'hidemajor' => true ] ],
1008 [ 'hideliu', [ 'hideliu' => true ] ],
1010 [ 'hidepatrolled', [ 'hidepatrolled' => true ] ],
1012 [ 'hideunpatrolled', [ 'hideunpatrolled' => true ] ],
1014 [ 'hideanons', [ 'hideanons' => true ] ],
1016 [ 'hidemyself', [ 'hidemyself' => true ] ],
1018 [ 'hidebyothers', [ 'hidebyothers' => true ] ],
1020 [ 'hidehumans', [ 'hidehumans' => true ] ],
1022 [ 'hidepageedits', [ 'hidepageedits' => true ] ],
1024 [ 'pagedits', [ 'hidepageedits' => false ] ],
1026 [ 'hidenewpages', [ 'hidenewpages' => true ] ],
1028 [ 'hidecategorization', [ 'hidecategorization' => true ] ],
1030 [ 'hidelog', [ 'hidelog' => true ] ],
1033 'userExpLevel=learner;experienced',
1035 'userExpLevel' => 'learner;experienced'
1039 // A few random combos
1041 'bots,hideliu,hidemyself',
1043 'hidebots' => false,
1045 'hidemyself' => true,
1050 'minor,hideanons,categorization',
1052 'hideminor' => false,
1053 'hideanons' => true,
1054 'hidecategorization' => false,
1059 'hidehumans,bots,hidecategorization',
1061 'hidehumans' => true,
1062 'hidebots' => false,
1063 'hidecategorization' => true,
1068 'hidemyself,userExpLevel=newcomer;learner,hideminor',
1070 'hidemyself' => true,
1071 'hideminor' => true,
1072 'userExpLevel' => 'newcomer;learner',
1078 public function provideGetFilterConflicts() {
1082 "expectedConflicts" => false,
1087 "userExpLevel" => "newcomer",
1089 "expectedConflicts" => false,
1093 "hideanons" => true,
1094 "userExpLevel" => "learner",
1096 "expectedConflicts" => false,
1100 "hidemajor" => true,
1101 "hidenewpages" => true,
1102 "hidepageedits" => true,
1103 "hidecategorization" => false,
1105 "hideWikidata" => true,
1107 "expectedConflicts" => true,
1111 "hidemajor" => true,
1112 "hidenewpages" => false,
1113 "hidepageedits" => true,
1114 "hidecategorization" => false,
1116 "hideWikidata" => true,
1118 "expectedConflicts" => true,
1122 "hidemajor" => true,
1123 "hidenewpages" => false,
1124 "hidepageedits" => false,
1125 "hidecategorization" => true,
1127 "hideWikidata" => true,
1129 "expectedConflicts" => false,
1133 "hideminor" => true,
1134 "hidenewpages" => true,
1135 "hidepageedits" => true,
1136 "hidecategorization" => false,
1138 "hideWikidata" => true,
1140 "expectedConflicts" => false,
1146 * @dataProvider provideGetFilterConflicts
1148 public function testGetFilterConflicts( $parameters, $expectedConflicts ) {
1149 $context = new RequestContext
;
1150 $context->setRequest( new FauxRequest( $parameters ) );
1151 $this->changesListSpecialPage
->setContext( $context );
1153 $this->assertEquals(
1155 $this->changesListSpecialPage
->areFiltersInConflict()
1159 public function validateOptionsProvider() {
1162 [ 'hideanons' => 1, 'hideliu' => 1, 'hidebots' => 1 ],
1164 [ 'userExpLevel' => 'unregistered', 'hidebots' => 1, ],
1168 [ 'hideanons' => 1, 'hideliu' => 1, 'hidebots' => 0 ],
1170 [ 'hidebots' => 0, 'hidehumans' => 1 ],
1174 [ 'hideanons' => 1 ],
1176 [ 'userExpLevel' => 'registered' ],
1182 [ 'userExpLevel' => 'unregistered' ],
1186 [ 'hideanons' => 1, 'hidebots' => 1 ],
1188 [ 'userExpLevel' => 'registered', 'hidebots' => 1 ],
1192 [ 'hideliu' => 1, 'hidebots' => 0 ],
1194 [ 'userExpLevel' => 'unregistered', 'hidebots' => 0 ],
1198 [ 'hidemyself' => 1, 'hidebyothers' => 1 ],
1204 [ 'hidebots' => 1, 'hidehumans' => 1 ],
1210 [ 'hidepatrolled' => 1, 'hideunpatrolled' => 1 ],
1216 [ 'hideminor' => 1, 'hidemajor' => 1 ],
1223 [ 'hidepageedits' => 1, 'hidenewpages' => 1, 'hidecategorization' => 1, 'hidelog' => 1, ],