# 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
$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
################################################################################
require "CGI.pl";
+ConnectToDatabase();
quietly_check_login();
print "Content-type: text/html\n";
# The master list not only says what fields are possible, but what order
# they get displayed in.
-ConnectToDatabase();
GetVersionTable();
my @masterlist = ("opendate", "changeddate", "severity", "priority",
# If we're using LDAP for login, then we can't create a new account here.
if(Param('useLDAP')) {
+ # Just in case someone already has an account, let them get the correct
+ # footer on the error message
+ quietly_check_login();
DisplayError("This site is using LDAP for authentication. Please contact
an LDAP administrator to get a new account created.",
"Can't create LDAP accounts");
require "CGI.pl";
ConnectToDatabase();
-GetVersionTable();
-
quietly_check_login();
+GetVersionTable();
+
if (!defined $::FORM{'product'}) {
# Reference to a subset of %::proddesc, which the user is allowed to see
my %products;
%::param_default,
@::param_list;
-
+ConnectToDatabase();
confirm_login();
print "Content-type: text/html\n\n";
# Preliminary checks:
#
+ConnectToDatabase();
confirm_login();
print "Content-type: text/html\n\n";
require "CGI.pl";
+ConnectToDatabase();
confirm_login();
print "Content-type: text/html\n\n";
# Preliminary checks:
#
+ConnectToDatabase();
confirm_login();
print "Content-type: text/html\n\n";
# Preliminary checks:
#
+ConnectToDatabase();
confirm_login();
print "Content-type: text/html\n\n";
use vars @::param_desc,
@::param_list;
+ConnectToDatabase();
confirm_login();
print "Content-type: text/html\n\n";
# Preliminary checks:
#
+ConnectToDatabase();
confirm_login();
print "Content-type: text/html\n\n";
# Preliminary checks:
#
+ConnectToDatabase();
confirm_login();
print "Content-type: text/html\n\n";
# Preliminary checks:
#
+ConnectToDatabase();
confirm_login();
print "Content-type: text/html\n\n";
}
ConnectToDatabase();
+confirm_login();
sub Log {
my ($str) = (@_);
exit;
}
-confirm_login();
my $exporter = $::COOKIE{"Bugzilla_login"};
my $movers = Param("movers");
$movers =~ s/\w?,\w?/|/g;
# Use global template variables.
use vars qw($vars $template);
+ConnectToDatabase();
confirm_login();
}
umask 0;
-ConnectToDatabase();
# Some sanity checking
if(Param("usebuggroupsentry") && GroupExists($product)) {
%superusergroupset
$next_bug);
+ConnectToDatabase();
my $whoid = confirm_login();
my $requiremilestone = 0;
CheckFormFieldDefined(\%::FORM, 'target_milestone');
}
-ConnectToDatabase();
-
#
# This function checks if there is a comment required for a specific
# function and tests, if the comment was given.
require "CGI.pl";
ConnectToDatabase();
+quietly_check_login();
+
GetVersionTable();
print "Content-type: text/html\n\n";
stored on this version of Bugzilla:
};
-ConnectToDatabase();
-
my $tableheader = qq{
<p><table border="1" cellpadding="4" cellspacing="0">
<tr bgcolor="#6666FF">
print "</table><p>\n";
-quietly_check_login();
if (UserInGroup("editkeywords")) {
print qq{<p><a href="editkeywords.cgi">Edit keywords</a>\n};
require "CGI.pl";
+# Even though quips aren't (yet) in the database, we need to check
+# logins for the footer
+ConnectToDatabase();
+quietly_check_login();
+
my $action = $::FORM{'action'} || "";
if ($action eq "show") {
);
ConnectToDatabase();
+quietly_check_login();
# Needed for $::anyvotesallowed
GetVersionTable();
-# Check to see if the user has logged in yet.
-quietly_check_login();
-
###############################################################################
# Main Body Execution
###############################################################################
# Establish a connection to the database backend.
ConnectToDatabase();
+quietly_check_login();
# Use the "Token" module that contains functions for doing various
# token-related tasks.
###############################################################################
# Live code (not subroutine definitions) starts here
###############################################################################
+
+ConnectToDatabase();
confirm_login();
GetVersionTable();
use vars qw($template $vars);
+ConnectToDatabase();
+quietly_check_login();
+
if (!defined $::FORM{'id'} || !$::FORM{'id'}) {
print "Content-Type: text/html\n\n";
$template->process("bug/choose-xml.html.tmpl", $vars)
exit;
}
-quietly_check_login();
-
my $exporter = $::COOKIE{"Bugzilla_login"} || undef;
my @ids = split (/[, ]+/, $::FORM{'id'});