Fix contradictory RC filters and add back-compat
authorStephane Bisson <sbisson@wikimedia.org>
Tue, 6 Dec 2016 15:25:35 +0000 (10:25 -0500)
committerStephane Bisson <sbisson@wikimedia.org>
Thu, 4 May 2017 12:49:36 +0000 (08:49 -0400)
commit5bd1b43e6a3aeadc25abbf24aa1d893ad7d20bae
tree3b93a286581a72ccc4bbf7f8a1915ed9a22368ba
parent181ffdb0930ac9ea8792c3acd0207a18ba8434fd
Fix contradictory RC filters and add back-compat

Some combinations of RC filters should never appear
together because they guarantee to return no data
and cannot be visually represented in the new RC
filters UI (ERI project).

Examples include:
* 'hidemyself' and 'hidebyothers'
* 'hideminor' and 'hidemajor'
* All of the filters in the changeType group (which
  is extended by extensions)

This also handles an old special case, but it now redirects
instead of doing it silently:

hideanons=1 & hideliu=1 & hidebots=1 -> hideliu=1 & hidebots=1
hideanons=1 & hideliu=1 & hidebots=0 -> hidehumans=1

Bug: T151873
Change-Id: Id08dccd07b262ce61c9d38563f19a0ab181e2341
includes/specialpage/ChangesListSpecialPage.php
includes/specials/SpecialRecentchanges.php
tests/phpunit/includes/specialpage/AbstractChangesListSpecialPageTestCase.php
tests/phpunit/includes/specialpage/ChangesListSpecialPageTest.php
tests/phpunit/includes/specials/SpecialRecentchangesTest.php