* Use the context when building the preferences form descriptor
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 9 Oct 2011 11:43:06 +0000 (11:43 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 9 Oct 2011 11:43:06 +0000 (11:43 +0000)
commitb6008e9086ee790dc3456bece511e95b112d37a0
tree3aa602a5725cd85ef4fbd2e2202449cf99d6d3ba
parent4d72d6a31df99fa15a926e44e4c159dfb5fedebd
* Use the context when building the preferences form descriptor
* Pass the HTMLForm object to the submit callback so that it can have a context and also access to the form itself (see below). This makes Preferences::tryUISubmit() and Prefrences::tryFormSubmit() signatures incompatible. The only extension calling these is EditUser and I will fix in my next commit.
* Added two extension possibilites (for EditUser): PreferencesForm::getExtraSuccessRedirectParameters() to modify the URL parameters when redirecting after successful save and the fourthparameter to Prefrences::getFormObject() to be able to remove some items from the descriptor
* Pass the user being modified to the HTMLForm to use it to save the preferences instead of doing this unconditionally on $wgUser (to remove one hack in EditUser preferences)
includes/HTMLForm.php
includes/Preferences.php