From b1f4cf8bdc4b49c02ebebbee2553202bc46ab720 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Tue, 4 Jul 2006 04:26:20 +0000 Subject: Bug 342869: Use Bugzilla->params everywhere except templates Patch By Max Kanat-Alexander r=LpSolit, a=justdave --- userprefs.cgi | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'userprefs.cgi') 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 -- cgit v1.2.3-24-g4f1b