diff options
author | Alexandre Emsenhuber <ialex@users.mediawiki.org> | 2011-10-09 11:43:06 +0000 |
---|---|---|
committer | Alexandre Emsenhuber <ialex@users.mediawiki.org> | 2011-10-09 11:43:06 +0000 |
commit | b6008e9086ee790dc3456bece511e95b112d37a0 (patch) | |
tree | 3aa602a5725cd85ef4fbd2e2202449cf99d6d3ba /includes/HTMLForm.php | |
parent | 4d72d6a31df99fa15a926e44e4c159dfb5fedebd (diff) | |
download | mediawikicore-b6008e9086ee790dc3456bece511e95b112d37a0.tar.gz mediawikicore-b6008e9086ee790dc3456bece511e95b112d37a0.zip |
* 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)
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/99346
Diffstat (limited to 'includes/HTMLForm.php')
-rw-r--r-- | includes/HTMLForm.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index 63a5d5966e2f..c30a77b3b11f 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -277,7 +277,7 @@ class HTMLForm { $data = $this->filterDataForSubmit( $this->mFieldData ); - $res = call_user_func( $callback, $data ); + $res = call_user_func( $callback, $data, $this ); return $res; } |