diff options
author | mkanat%bugzilla.org <> | 2006-07-04 04:26:20 +0000 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2006-07-04 04:26:20 +0000 |
commit | b1f4cf8bdc4b49c02ebebbee2553202bc46ab720 (patch) | |
tree | 8dddf198fa0cb29b5cef3833ff3469f07d34fdf7 /userprefs.cgi | |
parent | Bug 343112: @Bugzilla::Config::parampanels is only defined if something calls... (diff) | |
download | bugzilla-b1f4cf8bdc4b49c02ebebbee2553202bc46ab720.tar.gz bugzilla-b1f4cf8bdc4b49c02ebebbee2553202bc46ab720.tar.bz2 bugzilla-b1f4cf8bdc4b49c02ebebbee2553202bc46ab720.zip |
Bug 342869: Use Bugzilla->params everywhere except templates
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave
Diffstat (limited to 'userprefs.cgi')
-rwxr-xr-x | userprefs.cgi | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/userprefs.cgi b/userprefs.cgi index 3288efe65..a07cff135 100755 --- a/userprefs.cgi +++ b/userprefs.cgi @@ -50,7 +50,7 @@ sub DoAccount { ($vars->{'realname'}) = $dbh->selectrow_array( "SELECT realname FROM profiles WHERE userid = ?", undef, $user->id); - if(Param('allowemailchange') + if(Bugzilla->params->{'allowemailchange'} && Bugzilla->user->authorizer->can_change_email) { my @token = $dbh->selectrow_array( "SELECT tokentype, issuedate + " . @@ -113,7 +113,7 @@ sub SaveAccount { } } - if(Param("allowemailchange") && $cgi->param('new_login_name')) { + if(Bugzilla->params->{"allowemailchange"} && $cgi->param('new_login_name')) { my $old_login_name = $cgi->param('Bugzilla_login'); my $new_login_name = trim($cgi->param('new_login_name')); @@ -200,7 +200,7 @@ sub DoEmail { ########################################################################### # User watching ########################################################################### - if (Param("supportwatchers")) { + if (Bugzilla->params->{"supportwatchers"}) { my $watched_ref = $dbh->selectcol_arrayref( "SELECT profiles.login_name FROM watch INNER JOIN profiles" . " ON watch.watched = profiles.userid" . @@ -298,7 +298,9 @@ sub SaveEmail { ########################################################################### # User watching ########################################################################### - if (Param("supportwatchers") && defined $cgi->param('watchedusers')) { + if (Bugzilla->params->{"supportwatchers"} + && defined $cgi->param('watchedusers')) + { # Just in case. Note that this much locking is actually overkill: # we don't really care if anyone reads the watch table. So # some small amount of contention could be gotten rid of by |