summaryrefslogtreecommitdiffstats
path: root/userprefs.cgi
diff options
context:
space:
mode:
authorTiago Mello <timello@gmail.com>2012-01-18 22:30:54 +0100
committerTiago Mello <timello@gmail.com>2012-01-18 22:30:54 +0100
commit588cb97721e0a5c3e7009efcba2f6f17da1ce970 (patch)
tree55c05ab8694df28d0f4a9f9a039e95d95e893735 /userprefs.cgi
parentce3d3ecafe7283d46a0ebb9e45e384a1b9af27ed (diff)
downloadbugzilla-588cb97721e0a5c3e7009efcba2f6f17da1ce970.tar.gz
bugzilla-588cb97721e0a5c3e7009efcba2f6f17da1ce970.tar.xz
Bug 718905: Move user_preferences hook up, before other actions in userprefs.cgi
r=dkl, a=LpSolit
Diffstat (limited to 'userprefs.cgi')
-rwxr-xr-xuserprefs.cgi18
1 files changed, 10 insertions, 8 deletions
diff --git a/userprefs.cgi b/userprefs.cgi
index da6394f80..ac323c65e 100755
--- a/userprefs.cgi
+++ b/userprefs.cgi
@@ -499,6 +499,16 @@ check_token_data($token, 'edit_user_prefs') if $save_changes;
# Do any saving, and then display the current tab.
SWITCH: for ($current_tab_name) {
+
+ # Extensions must set it to 1 to confirm the tab is valid.
+ my $handled = 0;
+ Bugzilla::Hook::process('user_preferences',
+ { 'vars' => $vars,
+ save_changes => $save_changes,
+ current_tab => $current_tab_name,
+ handled => \$handled });
+ last SWITCH if $handled;
+
/^account$/ && do {
SaveAccount() if $save_changes;
DoAccount();
@@ -523,14 +533,6 @@ SWITCH: for ($current_tab_name) {
DoSavedSearches();
last SWITCH;
};
- # Extensions must set it to 1 to confirm the tab is valid.
- my $handled = 0;
- Bugzilla::Hook::process('user_preferences',
- { 'vars' => $vars,
- save_changes => $save_changes,
- current_tab => $current_tab_name,
- handled => \$handled });
- last SWITCH if $handled;
ThrowUserError("unknown_tab",
{ current_tab_name => $current_tab_name });