diff options
author | kiko%async.com.br <> | 2004-03-27 11:51:43 +0000 |
---|---|---|
committer | kiko%async.com.br <> | 2004-03-27 11:51:43 +0000 |
commit | 4df1c8fd665e5fc7c66e265b1f32b75837ae719f (patch) | |
tree | fb5150bb7dea016e53093830685d82c81ae817a6 /buglist.cgi | |
parent | Fix for bug 226754: Move InvalidateLogins into Bugzilla::Auth::CGI. ... (diff) | |
download | bugzilla-4df1c8fd665e5fc7c66e265b1f32b75837ae719f.tar.gz bugzilla-4df1c8fd665e5fc7c66e265b1f32b75837ae719f.tar.bz2 bugzilla-4df1c8fd665e5fc7c66e265b1f32b75837ae719f.zip |
Fix for bug 234175: Remove deprecated ConnectToDatabase() and
quietly_check_login()/confirm_login() calls. Cleans up callsites
(consisting of most of our CGIs), swapping (where appropriate) for calls
to Bugzilla->login. Patch by Teemu Mannermaa <wicked@etlicon.fi>.
r=bbaetz, kiko. a=justdave.
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-x | buglist.cgi | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/buglist.cgi b/buglist.cgi index 8a02ca490..2a71450aa 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -37,6 +37,7 @@ use vars qw($template $vars); use Bugzilla; use Bugzilla::Search; +use Bugzilla::Constants; # Include the Bugzilla CGI and general utility library. require "CGI.pl"; @@ -63,8 +64,6 @@ if (length($::buffer) == 0) { ThrowUserError("buglist_parameters_required"); } -ConnectToDatabase(); - ################################################################################ # Data and Security Validation ################################################################################ @@ -74,12 +73,12 @@ my $dotweak = $::FORM{'tweak'} ? 1 : 0; # Log the user in if ($dotweak) { - confirm_login(); + Bugzilla->login(LOGIN_REQUIRED); UserInGroup("editbugs") || ThrowUserError("insufficient_privs_for_multi"); GetVersionTable(); } else { - quietly_check_login(); + Bugzilla->login(); } # Hack to support legacy applications that think the RDF ctype is at format=rdf. @@ -182,7 +181,7 @@ sub iCalendarDateTime { sub LookupNamedQuery { my ($name) = @_; - confirm_login(); + Bugzilla->login(LOGIN_REQUIRED); my $userid = DBNameToIdAndCheck($::COOKIE{"Bugzilla_login"}); my $qname = SqlQuote($name); SendSQL("SELECT query FROM namedqueries WHERE userid = $userid AND name = $qname"); @@ -305,7 +304,7 @@ if ($::FORM{'cmdtype'} eq "dorem") { $order = $params->param('order') || $order; } elsif ($::FORM{'remaction'} eq "forget") { - confirm_login(); + Bugzilla->login(LOGIN_REQUIRED); my $userid = DBNameToIdAndCheck($::COOKIE{"Bugzilla_login"}); my $qname = SqlQuote($::FORM{'namedcmd'}); SendSQL("DELETE FROM namedqueries WHERE userid = $userid AND name = $qname"); @@ -325,7 +324,7 @@ if ($::FORM{'cmdtype'} eq "dorem") { } elsif (($::FORM{'cmdtype'} eq "doit") && $::FORM{'remtype'}) { if ($::FORM{'remtype'} eq "asdefault") { - confirm_login(); + Bugzilla->login(LOGIN_REQUIRED); my $userid = DBNameToIdAndCheck($::COOKIE{"Bugzilla_login"}); my $qname = SqlQuote($::defaultqueryname); my $qbuffer = SqlQuote($::buffer); @@ -335,7 +334,7 @@ elsif (($::FORM{'cmdtype'} eq "doit") && $::FORM{'remtype'}) { $vars->{'message'} = "buglist_new_default_query"; } elsif ($::FORM{'remtype'} eq "asnamed") { - confirm_login(); + Bugzilla->login(LOGIN_REQUIRED); my $userid = DBNameToIdAndCheck($::COOKIE{"Bugzilla_login"}); my $name = trim($::FORM{'newqueryname'}); |