From 70eb21091d161fe0325000af992f6f398683c92a Mon Sep 17 00:00:00 2001 From: "bbaetz%student.usyd.edu.au" <> Date: Mon, 17 Jun 2002 16:38:56 +0000 Subject: Bug 151053, ConnectToDatabase/quietly_check_login sometimes not called early enough r=mattyt, jouni --- buglist.cgi | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'buglist.cgi') diff --git a/buglist.cgi b/buglist.cgi index b649b8f1e..06eff5605 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -66,14 +66,28 @@ ConnectToDatabase(); # Data and Security Validation ################################################################################ +# Whether or not the user wants to change multiple bugs. +my $dotweak = $::FORM{'tweak'} ? 1 : 0; + +# Log the user in +if ($dotweak) { + confirm_login(); + if (!UserInGroup("editbugs")) { + DisplayError("Sorry, you do not have sufficient privileges to edit + multiple bugs."); + exit; + } + GetVersionTable(); +} +else { + quietly_check_login(); +} + # Determine the format in which the user would like to receive the output. # Uses the default format if the user did not specify an output format; # otherwise validates the user's choice against the list of available formats. my $format = ValidateOutputFormat($::FORM{'format'}, "list"); -# Whether or not the user wants to change multiple bugs. -my $dotweak = $::FORM{'tweak'} ? 1 : 0; - # Use server push to display a "Please wait..." message for the user while # executing their query if their browser supports it and they are viewing # the bug list as HTML and they have not disabled it by adding &serverpush=0 @@ -137,20 +151,6 @@ if ($::FORM{'cmdtype'} eq 'runnamed') { $filename =~ s/\s//; } -if ($dotweak) { - confirm_login(); - if (!UserInGroup("editbugs")) { - DisplayError("Sorry, you do not have sufficient privileges to edit - multiple bugs."); - exit; - } - GetVersionTable(); -} -else { - quietly_check_login(); -} - - ################################################################################ # Utilities ################################################################################ -- cgit v1.2.3-24-g4f1b