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 /buglist.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 'buglist.cgi')
-rwxr-xr-x | buglist.cgi | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/buglist.cgi b/buglist.cgi index 7e5e27a43..eaca25612 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -195,7 +195,7 @@ sub iCalendarDateTime { sub LookupNamedQuery { my ($name) = @_; Bugzilla->login(LOGIN_REQUIRED); - my $userid = DBNameToIdAndCheck(Bugzilla->user->login); + my $userid = Bugzilla->user->id; my $qname = SqlQuote($name); SendSQL("SELECT query FROM namedqueries WHERE userid = $userid AND name = $qname"); my $result = FetchOneColumn(); @@ -318,7 +318,7 @@ if ($::FORM{'cmdtype'} eq "dorem") { } elsif ($::FORM{'remaction'} eq "forget") { Bugzilla->login(LOGIN_REQUIRED); - my $userid = DBNameToIdAndCheck(Bugzilla->user->login); + my $userid = Bugzilla->user->id; my $qname = SqlQuote($::FORM{'namedcmd'}); SendSQL("DELETE FROM namedqueries WHERE userid = $userid AND name = $qname"); @@ -338,7 +338,7 @@ if ($::FORM{'cmdtype'} eq "dorem") { elsif (($::FORM{'cmdtype'} eq "doit") && $::FORM{'remtype'}) { if ($::FORM{'remtype'} eq "asdefault") { Bugzilla->login(LOGIN_REQUIRED); - my $userid = DBNameToIdAndCheck(Bugzilla->user->login); + my $userid = Bugzilla->user->id; my $qname = SqlQuote($::defaultqueryname); my $qbuffer = SqlQuote($::buffer); @@ -361,7 +361,7 @@ elsif (($::FORM{'cmdtype'} eq "doit") && $::FORM{'remtype'}) { } elsif ($::FORM{'remtype'} eq "asnamed") { Bugzilla->login(LOGIN_REQUIRED); - my $userid = DBNameToIdAndCheck(Bugzilla->user->login); + my $userid = Bugzilla->user->id; my $name = trim($::FORM{'newqueryname'}); $name || ThrowUserError("query_name_missing"); @@ -850,7 +850,7 @@ $vars->{'urlquerypart'} =~ s/(order|cmdtype)=[^&]*&?//g; $vars->{'order'} = $order; # The user's login account name (i.e. email address). -my $login = Bugzilla->user ? Bugzilla->user->login : ""; +my $login = Bugzilla->user->login; $vars->{'caneditbugs'} = UserInGroup('editbugs'); |