Revert "Pass $context to 'GetPreferences' hook"
authorKrinkle <krinklemail@gmail.com>
Sun, 9 Dec 2018 02:12:24 +0000 (02:12 +0000)
committerTimo Tijhof <krinklemail@gmail.com>
Mon, 10 Dec 2018 02:58:59 +0000 (02:58 +0000)
This reverts commit d68569459420e80aa0e2f2636fc7160c643cf5fb.

Change-Id: I1e9299b8fdc4727895fdac60f04cc5dfa4d09b7a

RELEASE-NOTES-1.33
docs/hooks.txt
includes/preferences/DefaultPreferencesFactory.php

index 8d4ac33..baf3689 100644 (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.
index 2f800a4..a7ff453 100644 (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
index 769954d..512a6b3 100644 (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()}'" );