From: bbaetz%student.usyd.edu.au <> Date: Mon, 3 Jun 2002 08:42:15 +0000 (+0000) Subject: Bug 145702 - query.cgi doesn't always ConnectToDatabase() early enough X-Git-Tag: bugzilla-2.16rc2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2f70665c4abd0cfc04b38077b2a0510632bc0c5;p=thirdparty%2Fbugzilla.git Bug 145702 - query.cgi doesn't always ConnectToDatabase() early enough r=justdave, preed --- diff --git a/query.cgi b/query.cgi index 75dce27061..c75834c339 100755 --- a/query.cgi +++ b/query.cgi @@ -50,6 +50,8 @@ use vars qw( $vars ); +ConnectToDatabase(); + if (defined $::FORM{"GoAheadAndLogIn"}) { # We got here from a login page, probably from relogin.cgi. We better # make sure the password is legit. @@ -301,7 +303,6 @@ $vars->{'userid'} = $::userid; # Boolean charts my @fields; push(@fields, { name => "noop", description => "---" }); -ConnectToDatabase(); SendSQL("SELECT name, description FROM fielddefs ORDER BY sortkey"); while (MoreSQLData()) { my ($name, $description) = FetchSQLData();