Bug 145702 - query.cgi doesn't always ConnectToDatabase() early enough

r=justdave, preed
parent 6a4c8ef4
...@@ -50,6 +50,8 @@ use vars qw( ...@@ -50,6 +50,8 @@ use vars qw(
$vars $vars
); );
ConnectToDatabase();
if (defined $::FORM{"GoAheadAndLogIn"}) { if (defined $::FORM{"GoAheadAndLogIn"}) {
# We got here from a login page, probably from relogin.cgi. We better # We got here from a login page, probably from relogin.cgi. We better
# make sure the password is legit. # make sure the password is legit.
...@@ -301,7 +303,6 @@ $vars->{'userid'} = $::userid; ...@@ -301,7 +303,6 @@ $vars->{'userid'} = $::userid;
# Boolean charts # Boolean charts
my @fields; my @fields;
push(@fields, { name => "noop", description => "---" }); push(@fields, { name => "noop", description => "---" });
ConnectToDatabase();
SendSQL("SELECT name, description FROM fielddefs ORDER BY sortkey"); SendSQL("SELECT name, description FROM fielddefs ORDER BY sortkey");
while (MoreSQLData()) { while (MoreSQLData()) {
my ($name, $description) = FetchSQLData(); my ($name, $description) = FetchSQLData();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment