Introduce preference filters
authorMax Semenik <maxsem.wiki@gmail.com>
Fri, 6 Jul 2018 19:21:22 +0000 (12:21 -0700)
committerMax Semenik <maxsem.wiki@gmail.com>
Tue, 17 Jul 2018 20:19:14 +0000 (13:19 -0700)
commite6b4944dbfd46854589d2fb1d3f22268bec1b226
tree6bab021ea56a91d393d07905ffad40d8320ba7b2
parent7951d4d8d5cf80cc6767e1460556076a4c4b9c9f
Introduce preference filters

This normalizes handling of transformations on the boundaries between
preferences and generic form controls and removes the special case
where email-blacklist is passed around as an array internally, leaking
into the API.

As a result of this normalization, meta=userinfo no longer returns an
array of users, using the internal representation like action=options.

Bug: T198935
Change-Id: Iff63da0d215585cfcf083e7f7ec8ed45d5b77301
13 files changed:
RELEASE-NOTES-1.32
includes/Preferences.php
includes/preferences/DefaultPreferencesFactory.php
includes/preferences/Filter.php [new file with mode: 0644]
includes/preferences/IntvalFilter.php [new file with mode: 0644]
includes/preferences/MultiUsernameFilter.php [new file with mode: 0644]
includes/preferences/TimezoneFilter.php [new file with mode: 0644]
includes/specials/SpecialEmailuser.php
includes/user/User.php
tests/phpunit/includes/api/ApiOptionsTest.php
tests/phpunit/includes/preferences/DefaultPreferencesFactoryTest.php
tests/phpunit/includes/preferences/FiltersTest.php [new file with mode: 0644]
tests/phpunit/includes/specials/SpecialPreferencesTest.php