summaryrefslogtreecommitdiffstats
path: root/votes.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-05-08 05:13:47 +0200
committerlpsolit%gmail.com <>2006-05-08 05:13:47 +0200
commitece3a7ec4685b281efee69286a4dbdeb44971661 (patch)
treea7cf408860ea24421ded09f46dc4d680cc5f19fa /votes.cgi
parent46c78a8c7c42bfdf47ee1f68939aa122371b9662 (diff)
downloadbugzilla-ece3a7ec4685b281efee69286a4dbdeb44971661.tar.gz
bugzilla-ece3a7ec4685b281efee69286a4dbdeb44971661.tar.xz
Bug 332598: Move ValidatePassword() and DBNameToIdAndCheck() from globals.pl into User.pm - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=myk
Diffstat (limited to 'votes.cgi')
-rwxr-xr-xvotes.cgi7
1 files changed, 4 insertions, 3 deletions
diff --git a/votes.cgi b/votes.cgi
index e1bfb3616..61154a069 100755
--- a/votes.cgi
+++ b/votes.cgi
@@ -29,6 +29,7 @@ use lib ".";
use Bugzilla;
use Bugzilla::Constants;
use Bugzilla::Bug;
+use Bugzilla::User;
require "globals.pl";
@@ -117,11 +118,11 @@ sub show_user {
# If a bug_id is given, and we're editing, we'll add it to the votes list.
$bug_id ||= "";
-
+
my $name = $cgi->param('user') || $user->login;
- my $who = DBNameToIdAndCheck($name);
+ my $who = login_to_id($name, THROW_ERROR);
my $userid = $user->id;
-
+
my $canedit = (Param('usevotes') && $userid == $who) ? 1 : 0;
$dbh->bz_lock_tables('bugs READ', 'products READ', 'votes WRITE',