Revert "Pass $context to 'GetPreferences' hook"

This reverts commit d685694594.

Change-Id: I1e9299b8fdc4727895fdac60f04cc5dfa4d09b7a
This commit is contained in:
Krinkle 2018-12-09 02:12:24 +00:00 committed by Timo Tijhof
parent 1ecacc2e21
commit 4b275c60de
3 changed files with 1 additions and 3 deletions

View file

@ -34,7 +34,6 @@ production.
* …
=== New features in 1.33 ===
* The 'GetPreferences' hook now receives an additional $context parameter.
* (T96041) __EXPECTUNUSEDCATEGORY__ on a category page causes the category
to be hidden on Special:UnusedCategories.
* Add PasswordPolicy to check the password isn't in the large blacklist.

View file

@ -1735,7 +1735,6 @@ $out: OutputPage object (to check what type of page the user is on)
'GetPreferences': Modify user preferences.
$user: User whose preferences are being modified.
&$preferences: Preferences description array, to be fed to an HTMLForm object
$context: IContextSource object (added in 1.33)
'GetRelativeTimestamp': Pre-emptively override the relative timestamp generated
by MWTimestamp::getRelativeTimestamp(). Return false in this hook to use the

View file

@ -127,7 +127,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
$this->watchlistPreferences( $user, $context, $preferences );
$this->searchPreferences( $preferences );
Hooks::run( 'GetPreferences', [ $user, &$preferences, $context ] );
Hooks::run( 'GetPreferences', [ $user, &$preferences ] );
$this->loadPreferenceValues( $user, $context, $preferences );
$this->logger->debug( "Created form descriptor for user '{$user->getName()}'" );