diff options
author | bugreport%peshkin.net <> | 2004-07-31 11:27:23 +0200 |
---|---|---|
committer | bugreport%peshkin.net <> | 2004-07-31 11:27:23 +0200 |
commit | 4c1db37570469aef2c7cc9f2ad9f859560ca8851 (patch) | |
tree | 17a519e7f08a85993b710ecd6d809bd9e4b40211 /votes.cgi | |
parent | 1ffd632931b05caea45f9c48079b455d156086be (diff) | |
download | bugzilla-4c1db37570469aef2c7cc9f2ad9f859560ca8851.tar.gz bugzilla-4c1db37570469aef2c7cc9f2ad9f859560ca8851.tar.xz |
Bug 253588: Change Bugzilla->user to be usable even for a logged-out user
patch by erik,joel
r=kiko
a=justdave
Diffstat (limited to 'votes.cgi')
-rwxr-xr-x | votes.cgi | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -126,10 +126,9 @@ sub show_user { my $name = $cgi->param('user') || Bugzilla->user->login; my $who = DBNameToIdAndCheck($name); - my $userid = Bugzilla->user ? Bugzilla->user->id : 0; + my $userid = Bugzilla->user->id; - my $canedit = 1 if (Bugzilla->user && - $name eq Bugzilla->user->login); + my $canedit = 1 if ($userid && $name eq Bugzilla->user->login); SendSQL("LOCK TABLES bugs READ, products READ, votes WRITE, cc READ, bug_group_map READ, user_group_map READ, |