my %isnull;
my $remaining = $buffer;
while ($remaining ne "") {
- my $item;
- if ($remaining =~ /^([^&]*)&(.*)$/) {
- $item = $1;
- $remaining = $2;
- } else {
- $item = $remaining;
- $remaining = "";
- }
-
- my $name;
- my $value;
- if ($item =~ /^([^=]*)=(.*)$/) {
- $name = $1;
- $value = url_decode($2);
- } else {
- $name = $item;
- $value = "";
- }
- if ($value ne "") {
- if (defined $f->{$name}) {
- $f->{$name} .= $value;
- my $ref = $m->{$name};
- push @$ref, $value;
- } else {
- $f->{$name} = $value;
- $m->{$name} = [$value];
- }
+ my $item;
+ if ($remaining =~ /^([^&]*)&(.*)$/) {
+ $item = $1;
+ $remaining = $2;
+ } else {
+ $item = $remaining;
+ $remaining = "";
+ }
+
+ my $name;
+ my $value;
+ if ($item =~ /^([^=]*)=(.*)$/) {
+ $name = $1;
+ $value = url_decode($2);
+ } else {
+ $name = $item;
+ $value = "";
+ }
+ if ($value ne "") {
+ if (defined $f->{$name}) {
+ $f->{$name} .= $value;
+ my $ref = $m->{$name};
+ push @$ref, $value;
+ } else {
+ $f->{$name} = $value;
+ $m->{$name} = [$value];
+ }
} else {
$isnull{$name} = 1;
}
# Finish validation and return if the user is in a role that has access to the bug.
if ($userid) {
return
- if ($reporter_accessible && $reporter == $userid)
+ if ($reporter_accessible && $reporter == $userid)
|| ($assignee_accessible && $assignee == $userid)
|| ($qacontact_accessible && $qacontact == $userid);
}
sub navigation_header {
if (defined $::COOKIE{"BUGLIST"} && $::COOKIE{"BUGLIST"} ne "" &&
defined $::FORM{'id'}) {
- my @bugs = split(/:/, $::COOKIE{"BUGLIST"});
- my $cur = lsearch(\@bugs, $::FORM{"id"});
- print "<B>Bug List:</B> (@{[$cur + 1]} of @{[$#bugs + 1]})\n";
- print "<A HREF=\"show_bug.cgi?id=$bugs[0]\">First</A>\n";
- print "<A HREF=\"show_bug.cgi?id=$bugs[$#bugs]\">Last</A>\n";
- if ($cur > 0) {
- print "<A HREF=\"show_bug.cgi?id=$bugs[$cur - 1]\">Prev</A>\n";
- } else {
- print "<I><FONT COLOR=\#777777>Prev</FONT></I>\n";
- }
- if ($cur < $#bugs) {
- $::next_bug = $bugs[$cur + 1];
- print "<A HREF=\"show_bug.cgi?id=$::next_bug\">Next</A>\n";
- } else {
- print "<I><FONT COLOR=\#777777>Next</FONT></I>\n";
- }
+ my @bugs = split(/:/, $::COOKIE{"BUGLIST"});
+ my $cur = lsearch(\@bugs, $::FORM{"id"});
+ print "<B>Bug List:</B> (@{[$cur + 1]} of @{[$#bugs + 1]})\n";
+ print "<A HREF=\"show_bug.cgi?id=$bugs[0]\">First</A>\n";
+ print "<A HREF=\"show_bug.cgi?id=$bugs[$#bugs]\">Last</A>\n";
+ if ($cur > 0) {
+ print "<A HREF=\"show_bug.cgi?id=$bugs[$cur - 1]\">Prev</A>\n";
+ } else {
+ print "<I><FONT COLOR=\#777777>Prev</FONT></I>\n";
+ }
+ if ($cur < $#bugs) {
+ $::next_bug = $bugs[$cur + 1];
+ print "<A HREF=\"show_bug.cgi?id=$::next_bug\">Next</A>\n";
+ } else {
+ print "<I><FONT COLOR=\#777777>Next</FONT></I>\n";
+ }
print qq{ <A HREF="buglist.cgi?regetlastlist=1">Show list</A>\n};
}
print " <A HREF=query.cgi>Query page</A>\n";
}
}
if (!$found && $default ne "") {
- $popup .= "<INPUT NAME=$name TYPE=CHECKBOX CHECKED>$default";
+ $popup .= "<INPUT NAME=$name TYPE=CHECKBOX CHECKED>$default";
}
return $popup;
}
exit 0;
} else {
- $popup .= "<OPTION SELECTED>$default\n";
+ $popup .= "<OPTION SELECTED>$default\n";
}
}
return $popup;
sub PasswordForLogin {
my ($login) = (@_);
SendSQL("select cryptpassword from profiles where login_name = " .
- SqlQuote($login));
+ SqlQuote($login));
my $result = FetchOneColumn();
if (!defined $result) {
$result = "";
$::disabledreason = '';
$::userid = 0;
if (defined $::COOKIE{"Bugzilla_login"} &&
- defined $::COOKIE{"Bugzilla_logincookie"}) {
+ defined $::COOKIE{"Bugzilla_logincookie"}) {
ConnectToDatabase();
if (!defined $ENV{'REMOTE_HOST'}) {
$ENV{'REMOTE_HOST'} = $ENV{'REMOTE_ADDR'};
SendSQL("SELECT profiles.userid, profiles.groupset, " .
"profiles.login_name, " .
"profiles.login_name = " .
- SqlQuote($::COOKIE{"Bugzilla_login"}) .
- " AND profiles.cryptpassword = logincookies.cryptpassword " .
- "AND logincookies.hostname = " .
- SqlQuote($ENV{"REMOTE_HOST"}) .
+ SqlQuote($::COOKIE{"Bugzilla_login"}) .
+ " AND profiles.cryptpassword = logincookies.cryptpassword " .
+ "AND logincookies.hostname = " .
+ SqlQuote($ENV{"REMOTE_HOST"}) .
", profiles.disabledtext " .
- " FROM profiles, logincookies WHERE logincookies.cookie = " .
- SqlQuote($::COOKIE{"Bugzilla_logincookie"}) .
- " AND profiles.userid = logincookies.userid");
+ " FROM profiles, logincookies WHERE logincookies.cookie = " .
+ SqlQuote($::COOKIE{"Bugzilla_logincookie"}) .
+ " AND profiles.userid = logincookies.userid");
my @row;
if (@row = FetchSQLData()) {
my ($userid, $groupset, $loginname, $ok, $disabledtext) = (@row);
print "I need a legitimate e-mail address and password to continue.\n";
}
if (!defined $nexturl || $nexturl eq "") {
- # Sets nexturl to be argv0, stripping everything up to and
- # including the last slash (or backslash on Windows).
- $0 =~ m:[^/\\]*$:;
- $nexturl = $&;
+ # Sets nexturl to be argv0, stripping everything up to and
+ # including the last slash (or backslash on Windows).
+ $0 =~ m:[^/\\]*$:;
+ $nexturl = $&;
}
my $method = "POST";
# We always want to use POST here, because we're submitting a password and don't
my ($title, $h1, $h2, $extra, $jscript) = (@_);
if (!defined $h1) {
- $h1 = $title;
+ $h1 = $title;
}
if (!defined $h2) {
- $h2 = "";
+ $h2 = "";
}
if (!defined $extra) {
- $extra = "";
+ $extra = "";
}
$jscript ||= "";
# If we are shutdown, we want a very basic page to give that
}
}
if ($loggedin) {
- #a little mandatory SQL, used later on
+ #a little mandatory SQL, used later on
SendSQL("SELECT mybugslink, userid, blessgroupset FROM profiles " .
"WHERE login_name = " . SqlQuote($::COOKIE{'Bugzilla_login'}));
my ($mybugslink, $userid, $blessgroupset) = (FetchSQLData());
</TD></TR>
};
- #begin preset queries
+ #begin preset queries
my $mybugstemplate = Param("mybugstemplate");
my %substs;
$substs{'userid'} = url_quote($::COOKIE{"Bugzilla_login"});
if (defined $ENV{"HTTP_COOKIE"}) {
foreach my $pair (split(/;/, $ENV{"HTTP_COOKIE"})) {
- $pair = trim($pair);
- if ($pair =~ /^([^=]*)=(.*)$/) {
- $::COOKIE{$1} = $2;
- } else {
- $::COOKIE{$pair} = "";
- }
+ $pair = trim($pair);
+ if ($pair =~ /^([^=]*)=(.*)$/) {
+ $::COOKIE{$1} = $2;
+ } else {
+ $::COOKIE{$pair} = "";
+ }
}
}
reporter,
bug_file_loc,
short_desc,
- target_milestone,
- qa_contact,
- status_whiteboard,
+ target_milestone,
+ qa_contact,
+ status_whiteboard,
date_format(creation_ts,'%Y-%m-%d %H:%i'),
groupset,
- delta_ts,
- sum(votes.count)
+ delta_ts,
+ sum(votes.count)
from bugs left join votes using(bug_id)
where bugs.bug_id = $id
group by bugs.bug_id";
my $component_popup = make_options($::components{$bug{'product'}},
- $bug{'component'});
+ $bug{'component'});
my $ccSet = new RelationSet;
$ccSet->mergeFromDB("select who from cc where bug_id=$id");
if ($::usergroupset ne '0') {
SendSQL("select bit, name, description, (bit & $bug{'groupset'} != 0) " .
- "from groups where bit & $::usergroupset != 0 " .
- "and isbuggroup != 0 " .
+ "from groups where bit & $::usergroupset != 0 " .
+ "and isbuggroup != 0 " .
# Include active groups as well as inactive groups to which
# the bug already belongs. This way the bug can be removed
# from an inactive group but can only be added to active ones.
"and (isactive = 1 or (bit & $bug{'groupset'} != 0)) " .
- "order by description");
+ "order by description");
# We only print out a header bit for this section if there are any
# results.
my $groupFound = 0;
$canconfirm = UserInGroup("canconfirm") || ($::userid == 0);
if ($canedit || $canconfirm) {
print "<INPUT TYPE=radio NAME=knob VALUE=confirm>";
- print "Confirm bug (change status to <b>NEW</b>)<br>";
+ print "Confirm bug (change status to <b>NEW</b>)<br>";
$knum++;
}
}
}
},
- "^dependson," => sub {
+ "^dependson," => sub {
my $table = "dependson_" . $chartid;
- push(@supptables, "dependencies $table");
- $ff = "$table.$f";
- $ref = $funcsbykey{",$t"};
- &$ref;
+ push(@supptables, "dependencies $table");
+ $ff = "$table.$f";
+ $ref = $funcsbykey{",$t"};
+ &$ref;
push(@wherepart, "$table.blocked = bugs.bug_id");
- },
+ },
- "^blocked," => sub {
+ "^blocked," => sub {
my $table = "blocked_" . $chartid;
- push(@supptables, "dependencies $table");
- $ff = "$table.$f";
- $ref = $funcsbykey{",$t"};
- &$ref;
+ push(@supptables, "dependencies $table");
+ $ff = "$table.$f";
+ $ref = $funcsbykey{",$t"};
+ &$ref;
push(@wherepart, "$table.dependson = bugs.bug_id");
- },
+ },
",equals" => sub {
last CMD;
};
/^editnamed$/ && do {
- my $url = "query.cgi?" . LookupNamedQuery($::FORM{"namedcmd"});
+ my $url = "query.cgi?" . LookupNamedQuery($::FORM{"namedcmd"});
print qq{Content-type: text/html
Refresh: 0; URL=$url
DefCol("summaryfull", "bugs.short_desc", "Summary", "bugs.short_desc", 1);
DefCol("status_whiteboard", "bugs.status_whiteboard", "StatusSummary", "bugs.status_whiteboard", 1);
DefCol("component", "substring(bugs.component, 1, 8)", "Comp",
- "bugs.component");
+ "bugs.component");
DefCol("product", "substring(bugs.product, 1, 8)", "Product", "bugs.product");
DefCol("version", "substring(bugs.version, 1, 5)", "Vers", "bugs.version");
DefCol("os", "substring(bugs.op_sys, 1, 4)", "OS", "bugs.op_sys");
"Windows 95",
"Windows 98",
"Windows ME", # Millenium Edition (upgrade of 98)
- "Windows 2000",
+ "Windows 2000",
"Windows NT",
"Mac System 7",
"Mac System 7.5",
unless (-d 'data') {
print "Creating data directory ...\n";
- # permissions for non-webservergroup are fixed later on
+ # permissions for non-webservergroup are fixed later on
mkdir 'data', 0770;
mkdir 'data/mimedump-tmp', 01777;
open FILE, '>>data/comments'; close FILE;
# a Bugzilla with the old data format, and so upgrade their data files.
unless (-d 'graphs') {
print "Creating graphs directory...\n";
- # permissions for non-webservergroup are fixed later on
+ # permissions for non-webservergroup are fixed later on
mkdir 'graphs', 0770;
# Upgrade data format
foreach my $in_file (glob("data/mining/*"))
if (!(-d $file)) {
# check if the file is executable.
if (isExecutableFile($file)) {
- #printf ("Changing $file to %o",$exeperm);
+ #printf ("Changing $file to %o",$exeperm);
chmod $exeperm, $file;
} else {
- #print ("Changing $file to %o", $normperm);
+ #print ("Changing $file to %o", $normperm);
chmod $normperm, $file;
}
}
$sth = $dbh->prepare("SELECT count(*) from duplicates");
$sth->execute();
if (!($sth->fetchrow_arrayref()->[0])) {
- # populate table
- print("Populating duplicates table...\n");
-
- $sth = $dbh->prepare("SELECT longdescs.bug_id, thetext FROM longdescs left JOIN bugs using(bug_id) WHERE (thetext " .
- "regexp '[.*.]{3,3} This bug has been marked as a duplicate of [[:digit:]]{1,5} [.*.]{3,3}') AND (resolution = 'DUPLICATE') ORDER" .
- " BY longdescs.bug_when");
- $sth->execute();
-
- my %dupes;
- my $key;
-
- # Because of the way hashes work, this loop removes all but the last dupe
- # resolution found for a given bug.
- while (my ($dupe, $dupe_of) = $sth->fetchrow_array()) {
- $dupes{$dupe} = $dupe_of;
- }
-
- foreach $key (keys(%dupes))
- {
- $dupes{$key} =~ s/.*\*\*\* This bug has been marked as a duplicate of (\d{1,5}) \*\*\*.*?/$1/sm;
- $dbh->do("INSERT INTO duplicates VALUES('$dupes{$key}', '$key')");
- # BugItsADupeOf Dupe
- }
+ # populate table
+ print("Populating duplicates table...\n");
+
+ $sth = $dbh->prepare("SELECT longdescs.bug_id, thetext FROM longdescs left JOIN bugs using(bug_id) WHERE (thetext " .
+ "regexp '[.*.]{3,3} This bug has been marked as a duplicate of [[:digit:]]{1,5} [.*.]{3,3}') AND (resolution = 'DUPLICATE') ORDER" .
+ " BY longdescs.bug_when");
+ $sth->execute();
+
+ my %dupes;
+ my $key;
+
+ # Because of the way hashes work, this loop removes all but the last dupe
+ # resolution found for a given bug.
+ while (my ($dupe, $dupe_of) = $sth->fetchrow_array()) {
+ $dupes{$dupe} = $dupe_of;
+ }
+
+ foreach $key (keys(%dupes))
+ {
+ $dupes{$key} =~ s/.*\*\*\* This bug has been marked as a duplicate of (\d{1,5}) \*\*\*.*?/$1/sm;
+ $dbh->do("INSERT INTO duplicates VALUES('$dupes{$key}', '$key')");
+ # BugItsADupeOf Dupe
+ }
}
# 2000-12-18. Added an 'emailflags' field for storing preferences about
ENDTEXT
# Re-crypt everyone's password.
- my $sth = $dbh->prepare("SELECT userid, password FROM profiles");
- $sth->execute();
+ my $sth = $dbh->prepare("SELECT userid, password FROM profiles");
+ $sth->execute();
my $i = 1;
print "Fixing password #1... ";
- while (my ($userid, $password) = $sth->fetchrow_array()) {
+ while (my ($userid, $password) = $sth->fetchrow_array()) {
my $cryptpassword = $dbh->quote(Crypt($password));
$dbh->do("UPDATE profiles SET cryptpassword = $cryptpassword WHERE userid = $userid");
++$i;
# Let the user know where we are at every 500 records.
print "$i... " if !($i%500);
- }
+ }
print "$i... Done.\n";
# Drop the plaintext password field and resize the cryptpassword field.
sub WriteParams {
foreach my $i (@::param_list) {
- if (!defined $::param{$i}) {
- $::param{$i} = $::param_default{$i};
+ if (!defined $::param{$i}) {
+ $::param{$i} = $::param_default{$i};
if (!defined $::param{$i}) {
die "No default parameter ever specified for $i";
}
- }
+ }
}
mkdir("data", 0777);
chmod 0777, "data";
$::param_type{$id} = $type;
$::param_default{$id} = $default;
if (defined $checker) {
- $::param_checker{$id} = $checker;
+ $::param_checker{$id} = $checker;
}
}
sub check_numeric {
my ($value) = (@_);
if ($value !~ /^[0-9]+$/) {
- return "must be a numeric value";
+ return "must be a numeric value";
}
return "";
}
# b -- A boolean value (either 1 or 0)
DefParam("maintainer",
- "The email address of the person who maintains this installation of Bugzilla.",
- "t",
+ "The email address of the person who maintains this installation of Bugzilla.",
+ "t",
'THE MAINTAINER HAS NOT YET BEEN SET');
DefParam("urlbase",
- "The URL that is the common initial leading part of all Bugzilla URLs.",
- "t",
- "http://cvs-mirror.mozilla.org/webtools/bugzilla/",
- \&check_urlbase);
+ "The URL that is the common initial leading part of all Bugzilla URLs.",
+ "t",
+ "http://cvs-mirror.mozilla.org/webtools/bugzilla/",
+ \&check_urlbase);
sub check_urlbase {
my ($url) = (@_);
if ($url !~ m:^http.*/$:) {
- return "must be a legal URL, that starts with http and ends with a slash.";
+ return "must be a legal URL, that starts with http and ends with a slash.";
}
return "";
}
"/");
DefParam("preferlists",
- "If this is on, Bugzilla will display most selection options as selection lists. If this is off, Bugzilla will use radio buttons and checkboxes instead.",
- "b",
- 1);
+ "If this is on, Bugzilla will display most selection options as selection lists. If this is off, Bugzilla will use radio buttons and checkboxes instead.",
+ "b",
+ 1);
DefParam("capitalizelists",
- "If this is on, Bugzilla will capitalize list entries, checkboxes, and radio buttons. If this is off, Bugzilla will leave these items untouched.",
- "b",
- 0);
+ "If this is on, Bugzilla will capitalize list entries, checkboxes, and radio buttons. If this is off, Bugzilla will leave these items untouched.",
+ "b",
+ 0);
DefParam("usequip",
- "If this is on, Bugzilla displays a silly quip at the beginning of buglists, and lets users add to the list of quips.",
- "b",
- 1);
+ "If this is on, Bugzilla displays a silly quip at the beginning of buglists, and lets users add to the list of quips.",
+ "b",
+ 1);
# Added parameter - JMR, 2/16/00
DefParam("usebuggroups",
sub check_despotbaseurl {
my ($url) = (@_);
if ($url !~ /^http.*cgi$/) {
- return "must be a legal URL, that starts with http and ends with .cgi";
+ return "must be a legal URL, that starts with http and ends with .cgi";
}
return "";
}
DefParam("defaultquery",
- "This is the default query that initially comes up when you submit a bug. It's in URL parameter format, which makes it hard to read. Sorry!",
- "t",
- "bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&order=%22Importance%22");
+ "This is the default query that initially comes up when you submit a bug. It's in URL parameter format, which makes it hard to read. Sorry!",
+ "t",
+ "bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&order=%22Importance%22");
DefParam("letsubmitterchoosepriority",
DefParam("usetargetmilestone",
- "Do you wish to use the Target Milestone field?",
- "b",
- 0);
+ "Do you wish to use the Target Milestone field?",
+ "b",
+ 0);
DefParam("nummilestones",
"If using Target Milestone, how many milestones do you wish to
0);
DefParam("useqacontact",
- "Do you wish to use the QA Contact field?",
- "b",
- 0);
+ "Do you wish to use the QA Contact field?",
+ "b",
+ 0);
DefParam("usestatuswhiteboard",
- "Do you wish to use the Status Whiteboard field?",
- "b",
- 0);
+ "Do you wish to use the Status Whiteboard field?",
+ "b",
+ 0);
DefParam("usebrowserinfo",
- "Do you want bug reports to be assigned an OS & Platform based on the browser
- the user makes the report from?",
- "b",
- 1);
+ "Do you want bug reports to be assigned an OS & Platform based on the browser
+ the user makes the report from?",
+ "b",
+ 1);
DefParam("usedependencies",
"Do you wish to use dependencies (allowing you to mark which bugs depend on which other ones)?",
DefParam("move-enabled",
"If this is on, Bugzilla will allow certain people to move bugs to the defined database.",
"b",
- 0);
+ 0);
DefParam("move-button-text",
"The text written on the Move button. Explain where the bug is being moved to.",
"t",
}
my $initialowner = trim($::FORM{initialowner} || '');
- #
- # Now validating to make sure it's too an existing account
- #
- DBNameToIdAndCheck($initialowner);
+ #
+ # Now validating to make sure it's too an existing account
+ #
+ DBNameToIdAndCheck($initialowner);
if ($initialowner eq '') {
print "You must enter an initial owner for the component '$component'. Please press\n";
PutTrailer($localtrailer);
exit;
}
- #
- # Now validating to make sure it's too an existing account
- #
- DBNameToIdAndCheck($initialqacontact);
+ #
+ # Now validating to make sure it's too an existing account
+ #
+ DBNameToIdAndCheck($initialqacontact);
}
# Add the new component
unless ($description) {
print "Sorry, I can't delete the description.";
PutTrailer($localtrailer);
- SendSQL("UNLOCK TABLES");
+ SendSQL("UNLOCK TABLES");
exit;
}
SendSQL("UPDATE components
if ($initialowner ne $initialownerold) {
unless ($initialowner) {
print "Sorry, I can't delete the initial owner.";
- SendSQL("UNLOCK TABLES");
+ SendSQL("UNLOCK TABLES");
PutTrailer($localtrailer);
exit;
}
if (Param('useqacontact') && $initialqacontact ne $initialqacontactold) {
unless ($initialqacontact) {
print "Sorry, I can't delete the initial QA contact.";
- SendSQL("UNLOCK TABLES");
+ SendSQL("UNLOCK TABLES");
PutTrailer($localtrailer);
exit;
}
unless ($component) {
print "Sorry, I can't delete the product name.";
PutTrailer($localtrailer);
- SendSQL("UNLOCK TABLES");
+ SendSQL("UNLOCK TABLES");
exit;
}
if (TestComponent($product,$component)) {
print "Sorry, component name '$component' is already in use.";
PutTrailer($localtrailer);
- SendSQL("UNLOCK TABLES");
+ SendSQL("UNLOCK TABLES");
exit;
}
# does the group exist?
SendSQL("SELECT name
- FROM groups
- WHERE name=" . SqlQuote($group));
+ FROM groups
+ WHERE name=" . SqlQuote($group));
return FetchOneColumn();
}
my $num = 0;
print "<P>\n";
foreach (@links) {
- print $_;
- if ($num == $count) {
- print ".\n";
- }
- elsif ($num == $count-1) {
- print " or ";
- }
- else {
- print ", ";
- }
- $num++;
+ print $_;
+ if ($num == $count) {
+ print ".\n";
+ }
+ elsif ($num == $count-1) {
+ print " or ";
+ }
+ else {
+ print ", ";
+ }
+ $num++;
}
PutFooter();
}
ShowError("The group '" . $name . "' already exists.<BR>" .
"Please click the <b>Back</b> button and try again.");
PutFooter();
- exit;
+ exit;
}
if ($isactive != 0 && $isactive != 1) {
"a problem with Bugzilla or a bug in your browser.<br>" .
"Please click the <b>Back</b> button and try again.");
PutFooter();
- exit;
+ exit;
}
# Major hack for bit values... perl can't handle 64-bit ints, so I can't
unless ($milestone) {
print "Sorry, I can't delete the milestone text.";
PutTrailer($localtrailer);
- SendSQL("UNLOCK TABLES");
+ SendSQL("UNLOCK TABLES");
exit;
}
if (TestMilestone($product,$milestone)) {
print "Sorry, milestone '$milestone' is already in use.";
PutTrailer($localtrailer);
- SendSQL("UNLOCK TABLES");
+ SendSQL("UNLOCK TABLES");
exit;
}
SendSQL("UPDATE bugs
print "<tr><td valign=top><input type=checkbox name=reset-$i>Reset</td><td>\n";
my $value = Param($i);
SWITCH: for ($::param_type{$i}) {
- /^t$/ && do {
+ /^t$/ && do {
print "<input size=80 name=$i value=\"" .
value_quote($value) . "\">\n";
last SWITCH;
- };
- /^l$/ && do {
+ };
+ /^l$/ && do {
print "<textarea wrap=hard name=$i rows=10 cols=80>" .
value_quote($value) . "</textarea>\n";
last SWITCH;
- };
+ };
/^b$/ && do {
my $on;
my $off;
SendSQL("UPDATE products SET product=$qp WHERE product=$qpold");
SendSQL("UPDATE versions SET program=$qp WHERE program=$qpold");
SendSQL("UPDATE milestones SET product=$qp WHERE product=$qpold");
- # Need to do an update to groups as well. If there is a corresponding
- # bug group, whether usebuggroups is currently set or not, we want to
- # update it so it will match in the future. If there is no group, this
- # update statement will do nothing, so no harm done. -JMR, 3/8/00
+ # Need to do an update to groups as well. If there is a corresponding
+ # bug group, whether usebuggroups is currently set or not, we want to
+ # update it so it will match in the future. If there is no group, this
+ # update statement will do nothing, so no harm done. -JMR, 3/8/00
SendSQL("UPDATE groups " .
"SET name=$qp, " .
"description=".SqlQuote($product." Bugs Access")." ".
# does the product exist?
SendSQL("SELECT login_name
- FROM profiles
- WHERE login_name=" . SqlQuote($user));
+ FROM profiles
+ WHERE login_name=" . SqlQuote($user));
return FetchOneColumn();
}
# do we have a product?
unless ($user) {
- print "Sorry, you haven't specified a user.";
+ print "Sorry, you haven't specified a user.";
PutTrailer();
- exit;
+ exit;
}
unless (TestUser $user) {
- print "Sorry, user '$user' does not exist.";
+ print "Sorry, user '$user' does not exist.";
PutTrailer();
- exit;
+ exit;
}
}
my $num = 0;
print "<P>\n";
foreach (@links) {
- print $_;
- if ($num == $count) {
- print ".\n";
- }
- elsif ($num == $count-1) {
- print " or ";
- }
- else {
- print ", ";
- }
- $num++;
+ print $_;
+ if ($num == $count) {
+ print ".\n";
+ }
+ elsif ($num == $count-1) {
+ print " or ";
+ }
+ else {
+ print ", ";
+ }
+ $num++;
}
PutFooter();
}
} elsif ($::FORM{'matchtype'} eq 'regexp') {
$query .= "regexp";
$matchstr = '.'
- unless $matchstr;
+ unless $matchstr;
} elsif ($::FORM{'matchtype'} eq 'notregexp') {
$query .= "not regexp";
$matchstr = '.'
- unless $matchstr;
+ unless $matchstr;
} else {
die "Unknown match type";
}
if ($count % 100 == 0) {
print "</table>$header";
}
- my ($user, $realname, $disabledtext) = FetchSQLData();
+ my ($user, $realname, $disabledtext) = FetchSQLData();
my $s = "";
my $e = "";
if ($disabledtext) {
$s = "<STRIKE>";
$e = "</STRIKE>";
}
- $realname ||= "<FONT COLOR=\"red\">missing</FONT>";
- print "<TR>\n";
- print " <TD VALIGN=\"top\"><A HREF=\"editusers.cgi?action=edit&user=", url_quote($user), "\"><B>$s$user$e</B></A></TD>\n";
- print " <TD VALIGN=\"top\">$s$realname$e</TD>\n";
+ $realname ||= "<FONT COLOR=\"red\">missing</FONT>";
+ print "<TR>\n";
+ print " <TD VALIGN=\"top\"><A HREF=\"editusers.cgi?action=edit&user=", url_quote($user), "\"><B>$s$user$e</B></A></TD>\n";
+ print " <TD VALIGN=\"top\">$s$realname$e</TD>\n";
if ($candelete) {
print " <TD VALIGN=\"top\"><A HREF=\"editusers.cgi?action=del&user=", url_quote($user), "\">Delete</A></TD>\n";
}
- print "</TR>";
+ print "</TR>";
}
if ($editall && !Param('useLDAP')) {
print "<TR>\n";
exit;
}
if (TestUser($user)) {
- print "The user '$user' does already exist. Please press\n";
- print "<b>Back</b> and try again.\n";
+ print "The user '$user' does already exist. Please press\n";
+ print "<b>Back</b> and try again.\n";
PutTrailer($localtrailer);
- exit;
+ exit;
}
my $passworderror = ValidatePassword($password);
if ( $passworderror ) {
print "To change ${user}'s permissions, go back and <a href=\"editusers.cgi?action=edit&user=" . url_quote($user)."\">edit this user</A>";
print "<p>\n";
PutTrailer($localtrailer,
- "<a href=\"editusers.cgi?action=add\">add</a> another user.");
+ "<a href=\"editusers.cgi?action=add\">add</a> another user.");
exit;
}
# display some data about the user
SendSQL("SELECT realname, groupset FROM profiles
- WHERE login_name=" . SqlQuote($user));
+ WHERE login_name=" . SqlQuote($user));
my ($realname, $groupset) =
FetchSQLData();
$realname ||= "<FONT COLOR=\"red\">missing</FONT>";
print " <TD VALIGN=\"top\">Group set:</TD>\n";
print " <TD VALIGN=\"top\">";
SendSQL("SELECT name
- FROM groups
+ FROM groups
WHERE bit & $groupset = bit
- ORDER BY isbuggroup, name");
+ ORDER BY isbuggroup, name");
my $found = 0;
while ( MoreSQLData() ) {
- my ($name) = FetchSQLData();
+ my ($name) = FetchSQLData();
print "<br>\n" if $found;
print ucfirst $name;
$found = 1;
my $nodelete = '';
SendSQL("SELECT program, value
- FROM components
+ FROM components
WHERE initialowner=" . DBname_to_id($user));
$found = 0;
while (MoreSQLData()) {
- if ($found) {
- print "<BR>\n";
- } else {
- print "<TR>\n";
- print " <TD VALIGN=\"top\">Initial owner:</TD>\n";
- print " <TD VALIGN=\"top\">";
- }
- my ($product, $component) = FetchSQLData();
- print "<a href=\"editcomponents.cgi?product=", url_quote($product),
- "&component=", url_quote($component),
- "&action=edit\">$product: $component</a>";
- $found = 1;
- $nodelete = 'initial bug owner';
+ if ($found) {
+ print "<BR>\n";
+ } else {
+ print "<TR>\n";
+ print " <TD VALIGN=\"top\">Initial owner:</TD>\n";
+ print " <TD VALIGN=\"top\">";
+ }
+ my ($product, $component) = FetchSQLData();
+ print "<a href=\"editcomponents.cgi?product=", url_quote($product),
+ "&component=", url_quote($component),
+ "&action=edit\">$product: $component</a>";
+ $found = 1;
+ $nodelete = 'initial bug owner';
}
print "</TD>\n</TR>" if $found;
# Check if the user is an initialqacontact
SendSQL("SELECT program, value
- FROM components
+ FROM components
WHERE initialqacontact=" . DBname_to_id($user));
$found = 0;
while (MoreSQLData()) {
- if ($found) {
- print "<BR>\n";
- } else {
- print "<TR>\n";
- print " <TD VALIGN=\"top\">Initial QA contact:</TD>\n";
- print " <TD VALIGN=\"top\">";
- }
- my ($product, $component) = FetchSQLData();
- print "<a href=\"editcomponents.cgi?product=", url_quote($product),
- "&component=", url_quote($component),
- "&action=edit\">$product: $component</a>";
- $found = 1;
- $nodelete = 'initial QA contact';
+ if ($found) {
+ print "<BR>\n";
+ } else {
+ print "<TR>\n";
+ print " <TD VALIGN=\"top\">Initial QA contact:</TD>\n";
+ print " <TD VALIGN=\"top\">";
+ }
+ my ($product, $component) = FetchSQLData();
+ print "<a href=\"editcomponents.cgi?product=", url_quote($product),
+ "&component=", url_quote($component),
+ "&action=edit\">$product: $component</a>";
+ $found = 1;
+ $nodelete = 'initial QA contact';
}
print "</TD>\n</TR>" if $found;
if ($nodelete) {
- print "<P>You can't delete this user because '$user' is an $nodelete ",
- "for at least one product.";
- PutTrailer($localtrailer);
- exit;
+ print "<P>You can't delete this user because '$user' is an $nodelete ",
+ "for at least one product.";
+ PutTrailer($localtrailer);
+ exit;
}
CheckUser($user);
SendSQL("SELECT userid
- FROM profiles
- WHERE login_name=" . SqlQuote($user));
+ FROM profiles
+ WHERE login_name=" . SqlQuote($user));
my $userid = FetchOneColumn();
SendSQL("DELETE FROM profiles
- WHERE login_name=" . SqlQuote($user));
+ WHERE login_name=" . SqlQuote($user));
SendSQL("DELETE FROM logincookies
- WHERE userid=" . $userid);
+ WHERE userid=" . $userid);
print "User deleted.<BR>\n";
PutTrailer($localtrailer);
# get data of user
SendSQL("SELECT realname, groupset, blessgroupset, disabledtext
- FROM profiles
- WHERE login_name=" . SqlQuote($user));
+ FROM profiles
+ WHERE login_name=" . SqlQuote($user));
my ($realname, $groupset, $blessgroupset,
$disabledtext) = FetchSQLData();
my $groupset = "0";
foreach (keys %::FORM) {
- next unless /^bit_/;
- #print "$_=$::FORM{$_}<br>\n";
- $groupset .= " + $::FORM{$_}";
+ next unless /^bit_/;
+ #print "$_=$::FORM{$_}<br>\n";
+ $groupset .= " + $::FORM{$_}";
}
my $blessgroupset = "0";
foreach (keys %::FORM) {
- next unless /^blbit_/;
- #print "$_=$::FORM{$_}<br>\n";
- $blessgroupset .= " + $::FORM{$_}";
+ next unless /^blbit_/;
+ #print "$_=$::FORM{$_}<br>\n";
+ $blessgroupset .= " + $::FORM{$_}";
}
CheckUser($userold);
"($u, $::userid, now(), $fieldid, " .
" $groupsetold, $groupset)");
}
- print "Updated permissions.\n";
+ print "Updated permissions.\n";
}
}
if ($editall && $blessgroupset ne $blessgroupsetold) {
SendSQL("UPDATE profiles
- SET blessgroupset=" . $blessgroupset . "
- WHERE login_name=" . SqlQuote($userold));
- print "Updated ability to tweak permissions of other users.\n";
+ SET blessgroupset=" . $blessgroupset . "
+ WHERE login_name=" . SqlQuote($userold));
+ print "Updated ability to tweak permissions of other users.\n";
}
# Update the database with the user's new password if they changed it.
}
if ($editall && $realname ne $realnameold) {
SendSQL("UPDATE profiles
- SET realname=" . SqlQuote($realname) . "
- WHERE login_name=" . SqlQuote($userold));
- print "Updated real name.<BR>\n";
+ SET realname=" . SqlQuote($realname) . "
+ WHERE login_name=" . SqlQuote($userold));
+ print "Updated real name.<BR>\n";
}
if ($editall && $disabledtext ne $disabledtextold) {
SendSQL("UPDATE profiles
- SET disabledtext=" . SqlQuote($disabledtext) . "
- WHERE login_name=" . SqlQuote($userold));
+ SET disabledtext=" . SqlQuote($disabledtext) . "
+ WHERE login_name=" . SqlQuote($userold));
SendSQL("SELECT userid
- FROM profiles
- WHERE login_name=" . SqlQuote($user));
+ FROM profiles
+ WHERE login_name=" . SqlQuote($user));
my $userid = FetchOneColumn();
SendSQL("DELETE FROM logincookies
- WHERE userid=" . $userid);
- print "Updated disabled text.<BR>\n";
+ WHERE userid=" . $userid);
+ print "Updated disabled text.<BR>\n";
}
if ($editall && $user ne $userold) {
- unless ($user) {
- print "Sorry, I can't delete the user's name.";
+ unless ($user) {
+ print "Sorry, I can't delete the user's name.";
PutTrailer($localtrailer);
- exit;
+ exit;
}
- if (TestUser($user)) {
- print "Sorry, user name '$user' is already in use.";
+ if (TestUser($user)) {
+ print "Sorry, user name '$user' is already in use.";
PutTrailer($localtrailer);
- exit;
+ exit;
}
SendSQL("UPDATE profiles
- SET login_name=" . SqlQuote($user) . "
- WHERE login_name=" . SqlQuote($userold));
+ SET login_name=" . SqlQuote($user) . "
+ WHERE login_name=" . SqlQuote($userold));
- print "Updated user's name.<BR>\n";
+ print "Updated user's name.<BR>\n";
}
PutTrailer($localtrailer);
unless ($version) {
print "Sorry, I can't delete the version text.";
PutTrailer($localtrailer);
- SendSQL("UNLOCK TABLES");
+ SendSQL("UNLOCK TABLES");
exit;
}
if (TestVersion($product,$version)) {
print "Sorry, version '$version' is already in use.";
PutTrailer($localtrailer);
- SendSQL("UNLOCK TABLES");
+ SendSQL("UNLOCK TABLES");
exit;
}
SendSQL("UPDATE bugs
/Mozilla.*\(Windows/ && do {return "PC";};
/Mozilla.*\(Macintosh/ && do {return "Macintosh";};
/Mozilla.*\(Win/ && do {return "PC";};
- /Mozilla.*Windows NT/ && do {return "PC";};
+ /Mozilla.*Windows NT/ && do {return "PC";};
/Mozilla.*Linux.*86/ && do {return "PC";};
/Mozilla.*BSD.*86/ && do {return "PC";};
/Mozilla.*Linux.*alpha/ && do {return "DEC";};
my $opsys_popup = make_popup('op_sys', \@::legal_opsys, pickos(), 0);
if (0 == @{$::components{$product}}) {
- print "<H1>Permission Denied</H1>\n";
- print "Sorry. You need to have at least one component for this product\n";
- print "in order to create a new bug. Go to the \"Components\" link to create\n";
- print "a new component\n";
- print "<P>\n";
- PutFooter();
- exit;
+ print "<H1>Permission Denied</H1>\n";
+ print "Sorry. You need to have at least one component for this product\n";
+ print "in order to create a new bug. Go to the \"Components\" link to create\n";
+ print "a new component\n";
+ print "<P>\n";
+ PutFooter();
+ exit;
} elsif (1 == @{$::components{$product}}) {
# Only one component; just pick it.
$::FORM{'component'} = $::components{$product}->[0];
$name = Param("shadowdb");
$::dbwritesallowed = 0;
}
- $::db = DBI->connect("DBI:mysql:host=$::db_host;database=$name", $::db_user, $::db_pass)
- || die "Bugzilla is currently broken. Please try again later. " .
+ $::db = DBI->connect("DBI:mysql:host=$::db_host;database=$name", $::db_user, $::db_pass)
+ || die "Bugzilla is currently broken. Please try again later. " .
"If the problem persists, please contact " . Param("maintainer") .
". The error you should quote is: " . $DBI::errstr;
}
SqlLog($str);
$::currentquery = $::db->prepare($str);
if (!$::currentquery->execute) {
- my $errstr = $::db->errstr;
- # Cut down the error string to a reasonable.size
- $errstr = substr($errstr, 0, 100) . ' ... ' . substr($errstr, -100)
- if length($errstr) > 200;
- die "$str: " . $errstr;
+ my $errstr = $::db->errstr;
+ # Cut down the error string to a reasonable.size
+ $errstr = substr($errstr, 0, 100) . ' ... ' . substr($errstr, -100)
+ if length($errstr) > 200;
+ die "$str: " . $errstr;
}
SqlLog("Done");
if (!$dontshadow && $iswrite && Param("shadowdb")) {
return 0;
}
if (defined @::fetchahead) {
- return 1;
+ return 1;
}
if (@::fetchahead = $::currentquery->fetchrow_array) {
- return 1;
+ return 1;
}
return 0;
}
return;
}
if (defined @::fetchahead) {
- my @result = @::fetchahead;
- undef @::fetchahead;
- return @result;
+ my @result = @::fetchahead;
+ undef @::fetchahead;
+ return @result;
}
return $::currentquery->fetchrow_array;
}
while ($guts =~ /^\'([^\']*)\',(.*)$/) {
push @result, $1;
$guts = $2;
- }
+ }
}
return @result;
}
print "<TD COLSPAN=2><B>Target Milestone:</B> $target_milestone\n";
}
print "<TR><TD COLSPAN=6><B>URL:</B> ";
- print "<A HREF=\"" . $url . "\">" . html_quote($url) . "</A>\n";
+ print "<A HREF=\"" . $url . "\">" . html_quote($url) . "</A>\n";
print "<TR><TD COLSPAN=6><B>Summary:</B> " . html_quote($shortdesc) . "\n";
if (@::legal_keywords) {
print "<TR><TD><B>Keywords: </B>$keywords</TD></TR>\n";
print "Content-type: text/html\n\n";
print "<TITLE>Nothing on your mind?</TITLE>";
print "<H1>Does your mind draw a blank?</H1>";
- print "<H2> Hit back, and try again...</H2>";
+ print "<H2> Hit back, and try again...</H2>";
exit 0;
}
if ($c =~ m/</) {
- print "Content-type: text/html\n\n";
- print "<CENTER><H1>For security reasons, support for tags";
- print " has been turned off in quips.\n</H1>\n";
- print "<H2> Hit back, and try again...</H2></CENTER>\n";
+ print "Content-type: text/html\n\n";
+ print "<CENTER><H1>For security reasons, support for tags";
+ print " has been turned off in quips.\n</H1>\n";
+ print "<H2> Hit back, and try again...</H2></CENTER>\n";
exit 0;
}
last SWITCH;
};
/^reopen$/ && CheckonComment( "reopen" ) && do {
- SendSQL("SELECT resolution FROM bugs WHERE bug_id = $::FORM{'id'}");
+ SendSQL("SELECT resolution FROM bugs WHERE bug_id = $::FORM{'id'}");
ChangeStatus('REOPENED');
ChangeResolution('');
- if (FetchOneColumn() eq 'DUPLICATE') {
- SendSQL("DELETE FROM duplicates WHERE dupe = $::FORM{'id'}");
- }
+ if (FetchOneColumn() eq 'DUPLICATE') {
+ SendSQL("DELETE FROM duplicates WHERE dupe = $::FORM{'id'}");
+ }
last SWITCH;
};
/^verify$/ && CheckonComment( "verify" ) && do {
}
}
- if ($me eq 'dependson') {
+ if ($me eq 'dependson') {
my @deps = @{$deps{'dependson'}};
my @blocks = @{$deps{'blocked'}};
my @union = ();
foreach my $b (@deps, @blocks) { $union{$b}++ && $isect{$b}++ }
@union = keys %union;
@isect = keys %isect;
- if (@isect > 0) {
+ if (@isect > 0) {
my $both;
foreach my $i (@isect) {
- $both = $both . "#" . $i . " ";
+ $both = $both . "#" . $i . " ";
}
PuntTryAgain("Dependency loop detected!<P>" .
"This bug can't be both blocked and dependent " .
# relationship to the bug of the person they are watching (if the person they
# are watching is an owner, their mail is filtered as if they were the owner).
if (Param("supportwatchers")) {
- my @watchers;
- foreach my $person(@emailList) {
- my $personId = DBname_to_id($person);
- SendSQL("SELECT watcher FROM watch WHERE watched = $personId");
- while(MoreSQLData()) {
- my ($watcher) = FetchSQLData();
- if ($watcher) {
- push (@watchers, DBID_to_name($watcher));
- }
- }
- }
- push(@emailList, @watchers);
+ my @watchers;
+ foreach my $person(@emailList) {
+ my $personId = DBname_to_id($person);
+ SendSQL("SELECT watcher FROM watch WHERE watched = $personId");
+ while(MoreSQLData()) {
+ my ($watcher) = FetchSQLData();
+ if ($watcher) {
+ push (@watchers, DBID_to_name($watcher));
+ }
+ }
+ }
+ push(@emailList, @watchers);
}
}
my @types = (
- ["noop", "---"],
- ["equals", "equal to"],
- ["notequals", "not equal to"],
- ["casesubstring", "contains (case-sensitive) substring"],
- ["substring", "contains (case-insensitive) substring"],
- ["notsubstring", "does not contain (case-insensitive) substring"],
- ["allwordssubstr", "all words as (case-insensitive) substrings"],
- ["anywordssubstr", "any words as (case-insensitive) substrings"],
- ["regexp", "contains regexp"],
- ["notregexp", "does not contain regexp"],
- ["lessthan", "less than"],
- ["greaterthan", "greater than"],
- ["anywords", "any words"],
- ["allwords", "all words"],
- ["nowords", "none of the words"],
- ["changedbefore", "changed before"],
- ["changedafter", "changed after"],
- ["changedfrom", "changed from"],
- ["changedto", "changed to"],
- ["changedby", "changed by"],
- );
+ ["noop", "---"],
+ ["equals", "equal to"],
+ ["notequals", "not equal to"],
+ ["casesubstring", "contains (case-sensitive) substring"],
+ ["substring", "contains (case-insensitive) substring"],
+ ["notsubstring", "does not contain (case-insensitive) substring"],
+ ["allwordssubstr", "all words as (case-insensitive) substrings"],
+ ["anywordssubstr", "any words as (case-insensitive) substrings"],
+ ["regexp", "contains regexp"],
+ ["notregexp", "does not contain regexp"],
+ ["lessthan", "less than"],
+ ["greaterthan", "greater than"],
+ ["anywords", "any words"],
+ ["allwords", "all words"],
+ ["nowords", "none of the words"],
+ ["changedbefore", "changed before"],
+ ["changedafter", "changed after"],
+ ["changedfrom", "changed from"],
+ ["changedto", "changed to"],
+ ["changedby", "changed by"],
+ );
print qq{<A NAME="chart"> </A>\n};
foreach my $cmd (grep(/^cmd-/, keys(%::FORM))) {
if ($cmd =~ /^cmd-add(\d+)-(\d+)-(\d+)$/) {
- $::FORM{"field$1-$2-$3"} = "xyzzy";
+ $::FORM{"field$1-$2-$3"} = "xyzzy";
}
}
-
+
# foreach my $i (sort(keys(%::FORM))) {
# print "$i : " . value_quote($::FORM{$i}) . "<BR>\n";
# }
my @rows;
my $row;
for ($row = 0 ; exists $::FORM{"field$chart-$row-0"} ; $row++) {
- my @cols;
- my $col;
- for ($col = 0 ; exists $::FORM{"field$chart-$row-$col"} ; $col++) {
- my $key = "$chart-$row-$col";
- my $deffield = $::FORM{"field$key"} || "";
- my $deftype = $::FORM{"type$key"} || "";
- my $defvalue = value_quote($::FORM{"value$key"} || "");
- my $line = "";
- $line .= "<TD>";
- $line .= BuildPulldown("field$key", \@fields, $deffield);
- $line .= BuildPulldown("type$key", \@types, $deftype);
- $line .= qq{<INPUT NAME="value$key" VALUE="$defvalue">};
- $line .= "</TD>\n";
- push(@cols, $line);
- }
- push(@rows, "<TR>" . join(qq{<TD ALIGN="center"> or </TD>\n}, @cols) .
- qq{<TD><INPUT TYPE="submit" VALUE="Or" NAME="cmd-add$chart-$row-$col" $jsmagic></TD></TR>});
+ my @cols;
+ my $col;
+ for ($col = 0 ; exists $::FORM{"field$chart-$row-$col"} ; $col++) {
+ my $key = "$chart-$row-$col";
+ my $deffield = $::FORM{"field$key"} || "";
+ my $deftype = $::FORM{"type$key"} || "";
+ my $defvalue = value_quote($::FORM{"value$key"} || "");
+ my $line = "";
+ $line .= "<TD>";
+ $line .= BuildPulldown("field$key", \@fields, $deffield);
+ $line .= BuildPulldown("type$key", \@types, $deftype);
+ $line .= qq{<INPUT NAME="value$key" VALUE="$defvalue">};
+ $line .= "</TD>\n";
+ push(@cols, $line);
+ }
+ push(@rows, "<TR>" . join(qq{<TD ALIGN="center"> or </TD>\n}, @cols) .
+ qq{<TD><INPUT TYPE="submit" VALUE="Or" NAME="cmd-add$chart-$row-$col" $jsmagic></TD></TR>});
}
print qq{
<HR>
# Rights Reserved.
#
# Contributor(s): Brian Bober <boberb@rpi.edu>
-# Terry Weissman <terry@mozilla.org>
-# Tara Hernandez <tara@tequilarista.org>
+# Terry Weissman <terry@mozilla.org>
+# Tara Hernandez <tara@tequilarista.org>
use vars %::FORM;
$max_table_size = 50;
my @products;
-$tableheader = qq{ <p><table border=0><tr><td>
- <table border="1" width="100%" cellpadding="4" cellspacing="0">
- <tr bgcolor="#6666FF">
- <th align="left">Product</th>
- <th align="left">Description</th></tr> };
+$tableheader = qq{ <p><table border=0><tr><td>
+ <table border="1" width="100%" cellpadding="4" cellspacing="0">
+ <tr bgcolor="#6666FF">
+ <th align="left">Product</th>
+ <th align="left">Description</th></tr> };
print qq{
- $tableheader
+ $tableheader
};
SendSQL("SELECT product,description FROM products ORDER BY product");
- while (MoreSQLData()) {
+ while (MoreSQLData()) {
- my ($product, $productdesc) = FetchSQLData();
- push (@products, $product);
+ my ($product, $productdesc) = FetchSQLData();
+ push (@products, $product);
- $line_count++;
- if ($line_count > $max_table_size) {
- print qq{
- </table>
- $tableheader
- };
- $line_count=1;
- }
+ $line_count++;
+ if ($line_count > $max_table_size) {
+ print qq{
+ </table>
+ $tableheader
+ };
+ $line_count=1;
+ }
- print qq{ <tr><th>$product</th><td>$productdesc</td></tr> };
+ print qq{ <tr><th>$product</th><td>$productdesc</td></tr> };
}
-print qq{
+print qq{
</table></td></tr></table> };
$line_count = 0;
$tableheader = qq{
- <p>
- <table border="1" width="100%" cellpadding="4" cellspacing="0">
- <tr bgcolor="#6666FF">
- <th align="left">Component</th>
- <th align="left">Product</th>
- <th align="left">Description</th></tr>
+ <p>
+ <table border="1" width="100%" cellpadding="4" cellspacing="0">
+ <tr bgcolor="#6666FF">
+ <th align="left">Component</th>
+ <th align="left">Product</th>
+ <th align="left">Description</th></tr>
};
-print qq{
+print qq{
<p><a name="component"></a>
<h4>Component</h4>
<p>Each product has components, against which bugs can be filed. Components are parts of
the product, and are assigned to a module owner. The following lists
components and their associated products:
- $tableheader
+ $tableheader
};
foreach $product (@products)
{
- SendSQL("SELECT value,description FROM components WHERE program=" . SqlQuote($product) . " ORDER BY value");
+ SendSQL("SELECT value,description FROM components WHERE program=" . SqlQuote($product) . " ORDER BY value");
- while (MoreSQLData()) {
+ while (MoreSQLData()) {
- my ($component, $compdesc) = FetchSQLData();
+ my ($component, $compdesc) = FetchSQLData();
- $line_count++;
- if ($line_count > $max_table_size) {
- print qq{
- </table>
- $tableheader
- };
- $line_count=0;
- }
- print qq{<tr><th>$component</th><td>$product</td><td>$compdesc</td></tr>};
- }
+ $line_count++;
+ if ($line_count > $max_table_size) {
+ print qq{
+ </table>
+ $tableheader
+ };
+ $line_count=0;
+ }
+ print qq{<tr><th>$component</th><td>$product</td><td>$compdesc</td></tr>};
+ }
}
<OPTION VALUE="changedto">changed to
<OPTION VALUE="changedby">changed by
</SELECT><INPUT NAME="value0-0-0" VALUE=""><INPUT TYPE="button" VALUE="Or" ><INPUT TYPE="button" VALUE="And"
- NAME="cmd-add0-1-0"></td></tr>
+ NAME="cmd-add0-1-0"></td></tr>
- <tr><td> </td><td align="center">
+ <tr><td> </td><td align="center">
<INPUT TYPE="button" VALUE="Add another boolean chart" NAME="cmd-add1-0-0">
<OPTION VALUE="changedto">changed to
<OPTION VALUE="changedby">changed by
</SELECT><INPUT NAME="value0-0-1" VALUE=""><INPUT TYPE="button" VALUE="Or" NAME="cmd-add0-0-2" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"><INPUT TYPE="button" VALUE="And"
- NAME="cmd-add0-1-0" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"></td></tr>
+ NAME="cmd-add0-1-0" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"></td></tr>
- <tr><td> </td><td align="center">
+ <tr><td> </td><td align="center">
<INPUT TYPE="button" VALUE="Add another boolean chart" NAME="cmd-add1-0-0" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;">
<OPTION VALUE="changedto">changed to
<OPTION VALUE="changedby">changed by
</SELECT><INPUT NAME="value0-1-0" VALUE=""><INPUT TYPE="button" VALUE="Or" NAME="cmd-add0-1-1" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"><INPUT TYPE="button" VALUE="And"
- NAME="cmd-add0-2-0" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"></td></tr>
+ NAME="cmd-add0-2-0" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"></td></tr>
- <tr><td> </td><td align="center">
+ <tr><td> </td><td align="center">
<INPUT TYPE="button" VALUE="Add another boolean chart" NAME="cmd-add1-0-0" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;">
<OPTION VALUE="changedto">changed to
<OPTION VALUE="changedby">changed by
</SELECT><INPUT NAME="value0-0-0" VALUE=""><INPUT TYPE="button" VALUE="Or" NAME="cmd-add0-0-1" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"><INPUT TYPE="button" VALUE="And"
- NAME="cmd-add0-1-0" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"></td></tr>
+ NAME="cmd-add0-1-0" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"></td></tr>
- <tr>
- <td colspan="2"><hr></td>
- </tr><tr><td> </td><td>
- <SELECT NAME="field1-0-0"><OPTION SELECTED VALUE="noop">---
+ <tr>
+ <td colspan="2"><hr></td>
+ </tr><tr><td> </td><td>
+ <SELECT NAME="field1-0-0"><OPTION SELECTED VALUE="noop">---
<OPTION VALUE="groupset">groupset
<OPTION VALUE="bug_id">Bug #
<OPTION VALUE="short_desc">Summary
<OPTION VALUE="changedto">changed to
<OPTION VALUE="changedby">changed by
</SELECT><INPUT NAME="value1-0-0" VALUE=""><INPUT TYPE="button" VALUE="Or" NAME="cmd-add1-0-1" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"><INPUT TYPE="button" VALUE="And"
- NAME="cmd-add1-1-0" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"></td></tr>
+ NAME="cmd-add1-1-0" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;"></td></tr>
- <tr><td> </td><td align="center">
+ <tr><td> </td><td align="center">
<INPUT TYPE="button" VALUE="Add another boolean chart" NAME="cmd-add2-0-0" ONCLICK="document.forms[0].action='query.cgi#chart' ; document.forms[0].method='POST' ; return 1;">
}
sub show_chart {
- # if we don't have the graphic mouldes don't even try to go
- # here. Should probably return some decent error message.
- return unless $use_gd;
+ # if we don't have the graphic mouldes don't even try to go
+ # here. Should probably return some decent error message.
+ return unless $use_gd;
if (! $FORM{datasets}) {
die_politely("You didn't select any datasets to plot");