diff options
author | Tiago Mello <timello@gmail.com> | 2012-01-18 22:32:46 +0100 |
---|---|---|
committer | Tiago Mello <timello@gmail.com> | 2012-01-18 22:32:46 +0100 |
commit | a656f7a4d499566863e740b0a2a491a535e3ac43 (patch) | |
tree | 8c60508fad0a319c1492197b37c27c7b834bb32e /userprefs.cgi | |
parent | e4206816f0392538934de85323b9f0616cd5fcd7 (diff) | |
download | bugzilla-a656f7a4d499566863e740b0a2a491a535e3ac43.tar.gz bugzilla-a656f7a4d499566863e740b0a2a491a535e3ac43.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-x | userprefs.cgi | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/userprefs.cgi b/userprefs.cgi index 94fe1def2..f0d5a8e53 100755 --- a/userprefs.cgi +++ b/userprefs.cgi @@ -514,6 +514,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(); @@ -538,14 +548,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 }); |