Commit 5eee3381 authored by terry%mozilla.org's avatar terry%mozilla.org

Patch by Ramon Felciano <felciano@ingenuity.com>, with many tweaks by

me. Added a footer to every page. Add some options to do things like display checkboxes instead of scrolling lists, and a new formatting for email diffs, and show list items capitalized instead of all upper case.
parent 5c232e77
...@@ -521,4 +521,6 @@ print " ...@@ -521,4 +521,6 @@ print "
navigation_header(); navigation_header();
PutFooter();
1; 1;
...@@ -77,6 +77,7 @@ OK, the <B>$::FORM{'namedcmd'}</B> query is gone. ...@@ -77,6 +77,7 @@ OK, the <B>$::FORM{'namedcmd'}</B> query is gone.
<P> <P>
<A HREF=query.cgi>Go back to the query page.</A> <A HREF=query.cgi>Go back to the query page.</A>
"; ";
PutFooter();
exit; exit;
}; };
/^asnamed$/ && do { /^asnamed$/ && do {
...@@ -103,6 +104,7 @@ Query names can only have letters, digits, spaces, or underbars. You entered ...@@ -103,6 +104,7 @@ Query names can only have letters, digits, spaces, or underbars. You entered
Click the <B>Back</B> button and type in a valid name for this query. Click the <B>Back</B> button and type in a valid name for this query.
"; ";
} }
PutFooter();
exit; exit;
}; };
/^asdefault$/ && do { /^asdefault$/ && do {
...@@ -116,6 +118,7 @@ individual query. ...@@ -116,6 +118,7 @@ individual query.
<P><A HREF=query.cgi>Go back to the query page, using the new default.</A> <P><A HREF=query.cgi>Go back to the query page, using the new default.</A>
"; ";
PutFooter();
exit; exit;
}; };
} }
...@@ -195,6 +198,7 @@ if (defined $::FORM{'votes'}) { ...@@ -195,6 +198,7 @@ if (defined $::FORM{'votes'}) {
print "\n\n<P>The 'At least ___ votes' field must be a simple "; print "\n\n<P>The 'At least ___ votes' field must be a simple ";
print "number. You entered \"$c\", which doesn't cut it."; print "number. You entered \"$c\", which doesn't cut it.";
print "<P>Please click the <B>Back</B> button and try again.\n"; print "<P>Please click the <B>Back</B> button and try again.\n";
PutFooter();
exit; exit;
} }
$minvotes = $c; $minvotes = $c;
...@@ -305,6 +309,7 @@ if ($::FORM{'keywords'}) { ...@@ -305,6 +309,7 @@ if ($::FORM{'keywords'}) {
print "<P>The legal keyword names are <A HREF=describekeywords.cgi>"; print "<P>The legal keyword names are <A HREF=describekeywords.cgi>";
print "listed here</A>.\n"; print "listed here</A>.\n";
print "<P>Please click the <B>Back</B> button and try again.\n"; print "<P>Please click the <B>Back</B> button and try again.\n";
PutFooter();
exit; exit;
} }
} }
...@@ -367,6 +372,7 @@ foreach my $id ("1", "2") { ...@@ -367,6 +372,7 @@ foreach my $id ("1", "2") {
if (!$foundone) { if (!$foundone) {
print "\n\n<P>You must specify one or more fields in which to search for <tt>$email</tt>.\n"; print "\n\n<P>You must specify one or more fields in which to search for <tt>$email</tt>.\n";
print "<P>Please click the <B>Back</B> button and try again.\n"; print "<P>Please click the <B>Back</B> button and try again.\n";
PutFooter();
exit; exit;
} }
if ($lead eq " or ") { if ($lead eq " or ") {
...@@ -385,6 +391,7 @@ if (defined $::FORM{'changedin'}) { ...@@ -385,6 +391,7 @@ if (defined $::FORM{'changedin'}) {
print "\n\n<P>The 'changed in last ___ days' field must be a simple "; print "\n\n<P>The 'changed in last ___ days' field must be a simple ";
print "number. You entered \"$c\", which doesn't cut it."; print "number. You entered \"$c\", which doesn't cut it.";
print "<P>Please click the <B>Back</B> button and try again.\n"; print "<P>Please click the <B>Back</B> button and try again.\n";
PutFooter();
exit; exit;
} }
$query .= "and to_days(now()) - to_days(bugs.delta_ts) <= $c "; $query .= "and to_days(now()) - to_days(bugs.delta_ts) <= $c ";
...@@ -408,6 +415,7 @@ sub SqlifyDate { ...@@ -408,6 +415,7 @@ sub SqlifyDate {
if (!defined $date) { if (!defined $date) {
print "\n\n<P>The string '<tt>$str</tt>' is not a legal date.\n"; print "\n\n<P>The string '<tt>$str</tt>' is not a legal date.\n";
print "<P>Please click the <B>Back</B> button and try again.\n"; print "<P>Please click the <B>Back</B> button and try again.\n";
PutFooter();
exit; exit;
} }
return time2str("'%Y/%m/%d %H:%M:%S'", $date); return time2str("'%Y/%m/%d %H:%M:%S'", $date);
...@@ -545,7 +553,7 @@ if ($dotweak) { ...@@ -545,7 +553,7 @@ if ($dotweak) {
pnl "<FORM NAME=changeform METHOD=POST ACTION=\"process_bug.cgi\">"; pnl "<FORM NAME=changeform METHOD=POST ACTION=\"process_bug.cgi\">";
} }
my $tablestart = "<TABLE CELLSPACING=0 CELLPADDING=2> my $tablestart = "<TABLE CELLSPACING=0 CELLPADDING=4 WIDTH=100%>
<TR ALIGN=LEFT><TH> <TR ALIGN=LEFT><TH>
<A HREF=\"buglist.cgi?$fields&order=bugs.bug_id\">ID</A>"; <A HREF=\"buglist.cgi?$fields&order=bugs.bug_id\">ID</A>";
...@@ -577,6 +585,18 @@ my %prodhash; ...@@ -577,6 +585,18 @@ my %prodhash;
my %statushash; my %statushash;
my $buggroupset = ""; my $buggroupset = "";
my $pricol = -1;
my $sevcol = -1;
for (my $colcount = 0 ; $colcount < @collist ; $colcount++) {
my $colname = $collist[$colcount];
if ($colname eq "priority") {
$pricol = $colcount;
}
if ($colname eq "severity") {
$sevcol = $colcount;
}
}
while (@row = FetchSQLData()) { while (@row = FetchSQLData()) {
my $bug_id = shift @row; my $bug_id = shift @row;
my $g = shift @row; # Bug's group set. my $g = shift @row; # Bug's group set.
...@@ -596,7 +616,30 @@ while (@row = FetchSQLData()) { ...@@ -596,7 +616,30 @@ while (@row = FetchSQLData()) {
pnl "</TABLE>$tablestart"; pnl "</TABLE>$tablestart";
} }
push @bugarray, $bug_id; push @bugarray, $bug_id;
pnl "<TR VALIGN=TOP ALIGN=LEFT><TD>";
# retrieve this bug's priority and severity, if available,
# by looping through all column names -- gross but functional
my $priority = "unknown";
my $severity;
if ($pricol >= 0) {
$priority = $row[$pricol];
}
if ($sevcol >= 0) {
$severity = $row[$sevcol];
}
my $customstyle = "";
if ($severity) {
if ($severity eq "enhan") {
$customstyle = "style='font-style:italic ! important'";
}
if ($severity eq "block") {
$customstyle = "style='color:red ! important; font-weight:bold ! important'";
}
if ($severity eq "criti") {
$customstyle = "style='color:red; ! important'";
}
}
pnl "<TR VALIGN=TOP ALIGN=LEFT CLASS=$priority $customstyle><TD>";
if ($dotweak) { if ($dotweak) {
pnl "<input type=checkbox name=id_$bug_id>"; pnl "<input type=checkbox name=id_$bug_id>";
} }
...@@ -613,7 +656,7 @@ while (@row = FetchSQLData()) { ...@@ -613,7 +656,7 @@ while (@row = FetchSQLData()) {
} else { } else {
$value = "<nobr>$value</nobr>"; $value = "<nobr>$value</nobr>";
} }
pnl "<td>$value"; pnl "<td class=$c>$value";
} elsif ($c eq "keywords") { } elsif ($c eq "keywords") {
my $query = my $query =
$::db->query("SELECT keyworddefs.name $::db->query("SELECT keyworddefs.name
...@@ -917,6 +960,8 @@ if ($count > 0) { ...@@ -917,6 +960,8 @@ if ($count > 0) {
} }
print "</FORM>\n"; print "</FORM>\n";
} }
PutFooter();
if ($serverpush) { if ($serverpush) {
print "\n--thisrandomstring--\n"; print "\n--thisrandomstring--\n";
} }
...@@ -87,13 +87,14 @@ On which of these bugs would you like email notification of changes?</td> ...@@ -87,13 +87,14 @@ On which of these bugs would you like email notification of changes?</td>
<a href=\"showvotes.cgi\">Review your votes</a> <a href=\"showvotes.cgi\">Review your votes</a>
<hr> <hr>
"; ";
navigation_header(); PutFooter();
exit; exit;
} }
if ($::FORM{'pwd1'} ne $::FORM{'pwd2'}) { if ($::FORM{'pwd1'} ne $::FORM{'pwd2'}) {
print "<H1>Try again.</H1> print "<H1>Try again.</H1>
The two passwords you entered did not match. Please click <b>Back</b> and try again.\n"; The two passwords you entered did not match. Please click <b>Back</b> and try again.\n";
PutFooter();
exit; exit;
} }
...@@ -113,6 +114,7 @@ Please choose a password that is between 3 and 15 characters long, and that ...@@ -113,6 +114,7 @@ Please choose a password that is between 3 and 15 characters long, and that
contains only numbers, letters, hyphens, or underlines. contains only numbers, letters, hyphens, or underlines.
<p> <p>
Please click <b>Back</b> and try again.\n"; Please click <b>Back</b> and try again.\n";
PutFooter();
exit; exit;
} }
...@@ -145,5 +147,5 @@ PutHeader("Preferences updated."); ...@@ -145,5 +147,5 @@ PutHeader("Preferences updated.");
print " print "
Your preferences have been updated. Your preferences have been updated.
<p>"; <p>";
navigation_header(); PutFooter();
...@@ -116,3 +116,4 @@ print "<INPUT TYPE=HIDDEN NAME=rememberedquery VALUE=$::buffer>\n"; ...@@ -116,3 +116,4 @@ print "<INPUT TYPE=HIDDEN NAME=rememberedquery VALUE=$::buffer>\n";
print "<INPUT TYPE=HIDDEN NAME=resetit VALUE=1>\n"; print "<INPUT TYPE=HIDDEN NAME=resetit VALUE=1>\n";
print "<INPUT TYPE=\"submit\" VALUE=\"Reset to Bugzilla default\">\n"; print "<INPUT TYPE=\"submit\" VALUE=\"Reset to Bugzilla default\">\n";
print "</FORM>\n"; print "</FORM>\n";
PutFooter();
...@@ -53,6 +53,7 @@ if (defined $login) { ...@@ -53,6 +53,7 @@ if (defined $login) {
print "exists. If you have forgotten the password for it, then\n"; print "exists. If you have forgotten the password for it, then\n";
print "<a href=query.cgi?GoAheadAndLogIn>click here</a> and use\n"; print "<a href=query.cgi?GoAheadAndLogIn>click here</a> and use\n";
print "the <b>E-mail me a password</b> button.\n"; print "the <b>E-mail me a password</b> button.\n";
PutFooter();
exit; exit;
} }
PutHeader("Account created"); PutHeader("Account created");
...@@ -63,6 +64,7 @@ if (defined $login) { ...@@ -63,6 +64,7 @@ if (defined $login) {
print "received, you may <a href=query.cgi?GoAheadAndLogIn>click\n"; print "received, you may <a href=query.cgi?GoAheadAndLogIn>click\n";
print "here</a> and log in. Or, you can just <a href=\"\">go back to\n"; print "here</a> and log in. Or, you can just <a href=\"\">go back to\n";
print "the top</a>."; print "the top</a>.";
PutFooter();
exit; exit;
} }
...@@ -87,3 +89,4 @@ as well. ...@@ -87,3 +89,4 @@ as well.
<input type=submit> <input type=submit>
}; };
PutFooter();
...@@ -31,6 +31,7 @@ use vars %::COOKIE, %::FILENAME; ...@@ -31,6 +31,7 @@ use vars %::COOKIE, %::FILENAME;
sub Punt { sub Punt {
my ($str) = (@_); my ($str) = (@_);
print "$str<P>Please hit <b>Back</b> and try again.\n"; print "$str<P>Please hit <b>Back</b> and try again.\n";
PutFooter();
exit; exit;
} }
...@@ -108,5 +109,5 @@ What kind of file is this? ...@@ -108,5 +109,5 @@ What kind of file is this?
print "<TD><A HREF=\"show_bug.cgi?id=$id\">Go Back to BUG# $id</A></TABLE>\n"; print "<TD><A HREF=\"show_bug.cgi?id=$id\">Go Back to BUG# $id</A></TABLE>\n";
} }
navigation_header(); PutFooter();
...@@ -121,6 +121,22 @@ sub check_urlbase { ...@@ -121,6 +121,22 @@ sub check_urlbase {
return ""; 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);
DefParam("prettyasciimail",
"If this is on, Bugzilla will send email reports formatted (assuming 76 character monospace font display). If this is off, email reports are sent using the old 'one-item-per-line' format.",
"b",
0);
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);
DefParam("usequip", 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.", "If this is on, Bugzilla displays a silly quip at the beginning of buglists, and lets users add to the list of quips.",
"b", "b",
...@@ -152,6 +168,18 @@ DefParam("headerhtml", ...@@ -152,6 +168,18 @@ DefParam("headerhtml",
"l", "l",
''); '');
DefParam("footerhtml",
"HTML to add to the bottom of every page. By default it displays the blurbhtml, and %commandmenu%, a menu of useful commands. You probably really want either headerhtml or footerhtml to include %commandmenu%.",
"l",
'<TABLE BORDER="0"><TR><TD BGCOLOR="#000000" VALIGN="TOP">
<TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%" BGCOLOR="lightyellow">
<TR><TD>
%blurbhtml%
<BR>
%commandmenu%
</TD></TR></TABLE></TD></TR></TABLE>');
DefParam("bannerhtml", DefParam("bannerhtml",
"The html that gets emitted at the head of every Bugzilla page. "The html that gets emitted at the head of every Bugzilla page.
...@@ -174,7 +202,10 @@ information about what Bugzilla is and what it can do, see ...@@ -174,7 +202,10 @@ information about what Bugzilla is and what it can do, see
<A HREF=\"http://www.mozilla.org/bugs/\"><B>bug pages</B></A>."); <A HREF=\"http://www.mozilla.org/bugs/\"><B>bug pages</B></A>.");
DefParam("mybugstemplate",
"This is the URL to use to bring up a simple 'all of my bugs' list for a user. %userid% will get replaced with the login name of a user.",
"t",
"buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&assigned_to=%userid%");
DefParam("shutdownhtml", DefParam("shutdownhtml",
"If this field is non-empty, then Bugzilla will be completely disabled and this text will be displayed instead of all the Bugzilla pages.", "If this field is non-empty, then Bugzilla will be completely disabled and this text will be displayed instead of all the Bugzilla pages.",
...@@ -386,11 +417,13 @@ DefParam("allowbugdeletion", ...@@ -386,11 +417,13 @@ DefParam("allowbugdeletion",
"b", "b",
0); 0);
DefParam("strictvaluechecks", DefParam("strictvaluechecks",
"Do stricter integrity checking on both form submission values and values read in from the database.", "Do stricter integrity checking on both form submission values and values read in from the database.",
"b", "b",
0); 0);
DefParam("browserbugmessage", DefParam("browserbugmessage",
"If strictvaluechecks is on, and the bugzilla gets unexpected data from the browser, in addition to displaying the cause of the problem, it will output this HTML as well.", "If strictvaluechecks is on, and the bugzilla gets unexpected data from the browser, in addition to displaying the cause of the problem, it will output this HTML as well.",
"l", "l",
......
...@@ -49,6 +49,7 @@ Product: <SELECT NAME=product> ...@@ -49,6 +49,7 @@ Product: <SELECT NAME=product>
<INPUT TYPE=\"submit\" VALUE=\"Submit\"> <INPUT TYPE=\"submit\" VALUE=\"Submit\">
</FORM> </FORM>
"; ";
PutFooter();
exit; exit;
} }
...@@ -95,3 +96,5 @@ while (MoreSQLData()) { ...@@ -95,3 +96,5 @@ while (MoreSQLData()) {
} }
print "<tr><td colspan=$cols><hr></td></tr></table>\n"; print "<tr><td colspan=$cols><hr></td></tr></table>\n";
PutFooter();
...@@ -76,4 +76,4 @@ if (UserInGroup("editkeywords")) { ...@@ -76,4 +76,4 @@ if (UserInGroup("editkeywords")) {
print "<p><a href=editkeywords.cgi>Edit keywords</a><p>\n"; print "<p><a href=editkeywords.cgi>Edit keywords</a><p>\n";
} }
navigation_header(); PutFooter();
...@@ -39,6 +39,7 @@ print "Content-type: text/html\n\n"; ...@@ -39,6 +39,7 @@ print "Content-type: text/html\n\n";
if (!UserInGroup("tweakparams")) { if (!UserInGroup("tweakparams")) {
print "<H1>Sorry, you aren't a member of the 'tweakparams' group.</H1>\n"; print "<H1>Sorry, you aren't a member of the 'tweakparams' group.</H1>\n";
print "And so, you aren't allowed to edit the parameters.\n"; print "And so, you aren't allowed to edit the parameters.\n";
PutFooter();
exit; exit;
} }
...@@ -58,6 +59,7 @@ foreach my $i (@::param_list) { ...@@ -58,6 +59,7 @@ foreach my $i (@::param_list) {
if ($ok ne "") { if ($ok ne "") {
print "New value for $i is invalid: $ok<p>\n"; print "New value for $i is invalid: $ok<p>\n";
print "Please hit <b>Back</b> and try again.\n"; print "Please hit <b>Back</b> and try again.\n";
PutFooter();
exit; exit;
} }
} }
...@@ -75,3 +77,4 @@ print "OK, done.<p>\n"; ...@@ -75,3 +77,4 @@ print "OK, done.<p>\n";
print "<a href=editparams.cgi>Edit the params some more.</a><p>\n"; print "<a href=editparams.cgi>Edit the params some more.</a><p>\n";
print "<a href=query.cgi>Go back to the query page.</a>\n"; print "<a href=query.cgi>Go back to the query page.</a>\n";
PutFooter();
...@@ -39,7 +39,7 @@ if ($who ne $::FORM{'who'}) { ...@@ -39,7 +39,7 @@ if ($who ne $::FORM{'who'}) {
print "The login info got confused. If you want to adjust the votes\n"; print "The login info got confused. If you want to adjust the votes\n";
print "for <tt>$::COOKIE{'Bugzilla_login'}</tt>, then please\n"; print "for <tt>$::COOKIE{'Bugzilla_login'}</tt>, then please\n";
print "<a href=showvotes.cgi?user=$who>click here</a>.<hr>\n"; print "<a href=showvotes.cgi?user=$who>click here</a>.<hr>\n";
navigation_header(); PutFooter();
exit(); exit();
} }
...@@ -48,7 +48,7 @@ my @buglist = grep {/^\d+$/} keys(%::FORM); ...@@ -48,7 +48,7 @@ my @buglist = grep {/^\d+$/} keys(%::FORM);
if (0 == @buglist) { if (0 == @buglist) {
PutHeader("Oops?"); PutHeader("Oops?");
print "Something got confused. Please click <b>Back</b> and try again."; print "Something got confused. Please click <b>Back</b> and try again.";
navigation_header(); PutFooter();
exit(); exit();
} }
...@@ -58,7 +58,7 @@ foreach my $id (@buglist) { ...@@ -58,7 +58,7 @@ foreach my $id (@buglist) {
PutHeader("Numbers only, please"); PutHeader("Numbers only, please");
print "Only use numeric values for your bug votes.\n"; print "Only use numeric values for your bug votes.\n";
print "Please click <b>Back</b> and try again.<hr>\n"; print "Please click <b>Back</b> and try again.<hr>\n";
navigation_header(); PutFooter();
exit(); exit();
} }
} }
...@@ -82,7 +82,7 @@ foreach my $prod (keys(%prodcount)) { ...@@ -82,7 +82,7 @@ foreach my $prod (keys(%prodcount)) {
print "You may only use $::prodmaxvotes{$prod} votes for bugs in the\n"; print "You may only use $::prodmaxvotes{$prod} votes for bugs in the\n";
print "<tt>$prod</tt> product, but you are using $prodcount{$prod}.\n"; print "<tt>$prod</tt> product, but you are using $prodcount{$prod}.\n";
print "Please click <b>Back</b> and try again.<hr>\n"; print "Please click <b>Back</b> and try again.<hr>\n";
navigation_header(); PutFooter();
exit(); exit();
} }
} }
...@@ -114,7 +114,7 @@ SendSQL("unlock tables"); ...@@ -114,7 +114,7 @@ SendSQL("unlock tables");
PutHeader("Voting tabulated", "Voting tabulated", $::COOKIE{'Bugzilla_login'}); PutHeader("Voting tabulated", "Voting tabulated", $::COOKIE{'Bugzilla_login'});
print "Your votes have been recorded.\n"; print "Your votes have been recorded.\n";
print qq{<p><a href="showvotes.cgi?user=$who">Review your votes</a><hr>\n}; print qq{<p><a href="showvotes.cgi?user=$who">Review your votes</a><hr>\n};
navigation_header(); PutFooter();
exit(); exit();
...@@ -171,7 +171,7 @@ sub PutTrailer (@) ...@@ -171,7 +171,7 @@ sub PutTrailer (@)
} }
$num++; $num++;
} }
print "</BODY>\n</HTML>\n"; PutFooter();
} }
......
...@@ -52,7 +52,7 @@ sub PutTrailer (@) ...@@ -52,7 +52,7 @@ sub PutTrailer (@)
} }
$num++; $num++;
} }
print "</BODY>\n</HTML>\n"; PutFooter();
} }
......
...@@ -38,6 +38,7 @@ print "Content-type: text/html\n\n"; ...@@ -38,6 +38,7 @@ print "Content-type: text/html\n\n";
if (!UserInGroup("tweakparams")) { if (!UserInGroup("tweakparams")) {
print "<H1>Sorry, you aren't a member of the 'tweakparams' group.</H1>\n"; print "<H1>Sorry, you aren't a member of the 'tweakparams' group.</H1>\n";
print "And so, you aren't allowed to edit the parameters.\n"; print "And so, you aren't allowed to edit the parameters.\n";
PutFooter();
exit; exit;
} }
...@@ -105,3 +106,4 @@ print "<input type=submit value=\"Submit changes\">\n"; ...@@ -105,3 +106,4 @@ print "<input type=submit value=\"Submit changes\">\n";
print "</form>\n"; print "</form>\n";
print "<p><a href=query.cgi>Skip all this, and go back to the query page</a>\n"; print "<p><a href=query.cgi>Skip all this, and go back to the query page</a>\n";
PutFooter();
...@@ -129,7 +129,7 @@ sub PutTrailer (@) ...@@ -129,7 +129,7 @@ sub PutTrailer (@)
} }
$num++; $num++;
} }
print "</BODY>\n</HTML>\n"; PutFooter();
} }
...@@ -637,8 +637,8 @@ if ($action eq 'update') { ...@@ -637,8 +637,8 @@ if ($action eq 'update') {
if ($description ne $descriptionold) { if ($description ne $descriptionold) {
unless ($description) { unless ($description) {
print "Sorry, I can't delete the description."; print "Sorry, I can't delete the description.";
PutTrailer($localtrailer);
SendSQL("UNLOCK TABLES"); SendSQL("UNLOCK TABLES");
PutTrailer($localtrailer);
exit; exit;
} }
SendSQL("UPDATE products SendSQL("UPDATE products
...@@ -665,14 +665,14 @@ if ($action eq 'update') { ...@@ -665,14 +665,14 @@ if ($action eq 'update') {
if ($product ne $productold) { if ($product ne $productold) {
unless ($product) { unless ($product) {
print "Sorry, I can't delete the product name."; print "Sorry, I can't delete the product name.";
PutTrailer($localtrailer);
SendSQL("UNLOCK TABLES"); SendSQL("UNLOCK TABLES");
PutTrailer($localtrailer);
exit; exit;
} }
if (TestProduct($product)) { if (TestProduct($product)) {
print "Sorry, product name '$product' is already in use."; print "Sorry, product name '$product' is already in use.";
PutTrailer($localtrailer);
SendSQL("UNLOCK TABLES"); SendSQL("UNLOCK TABLES");
PutTrailer($localtrailer);
exit; exit;
} }
......
...@@ -129,7 +129,7 @@ sub PutTrailer (@) ...@@ -129,7 +129,7 @@ sub PutTrailer (@)
} }
$num++; $num++;
} }
print "</BODY></HTML>\n"; PutFooter();
} }
......
...@@ -141,7 +141,7 @@ sub PutTrailer (@) ...@@ -141,7 +141,7 @@ sub PutTrailer (@)
} }
$num++; $num++;
} }
print "</BODY>\n</HTML>\n"; PutFooter();
} }
......
...@@ -12,14 +12,24 @@ ...@@ -12,14 +12,24 @@
# rights and limitations under the License. # rights and limitations under the License.
# #
# The Original Code is the Bugzilla Bug Tracking System. # The Original Code is the Bugzilla Bug Tracking System.
# #
# The Initial Developer of the Original Code is Netscape Communications # The Initial Developer of the Original Code is Netscape Communications
# Corporation. Portions created by Netscape are # Corporation. Portions created by Netscape are Copyright (C) 1998
# Copyright (C) 1998 Netscape Communications Corporation. All # Netscape Communications Corporation. All Rights Reserved.
# Rights Reserved. #
#
# Contributor(s): Terry Weissman <terry@mozilla.org> # Contributor(s): Terry Weissman <terry@mozilla.org>
########################################################################
#
# enter_bug.cgi
# -------------
# Displays bug entry form. Bug fields are specified through popup menus,
# drop-down lists, or text fields. Default for these values can be passed
# in as parameters to the cgi.
#
########################################################################
use diagnostics; use diagnostics;
use strict; use strict;
...@@ -56,6 +66,7 @@ if (!defined $::FORM{'product'}) { ...@@ -56,6 +66,7 @@ if (!defined $::FORM{'product'}) {
print "</tr>"; print "</tr>";
} }
print "</table>\n"; print "</table>\n";
PutFooter();
exit; exit;
} }
$::FORM{'product'} = $prodlist[0]; $::FORM{'product'} = $prodlist[0];
...@@ -184,7 +195,7 @@ my $opsys_popup = make_popup('op_sys', \@::legal_opsys, pickos(), 0); ...@@ -184,7 +195,7 @@ my $opsys_popup = make_popup('op_sys', \@::legal_opsys, pickos(), 0);
my $component_popup = make_popup('component', $::components{$product}, my $component_popup = make_popup('component', $::components{$product},
formvalue('component'), 1); formvalue('component'), 1);
PutHeader ("Enter Bug"); PutHeader ("Enter Bug","Enter Bug","This page lets you enter a new bug into Bugzilla.");
print " print "
<FORM METHOD=POST ACTION=\"post_bug.cgi\"> <FORM METHOD=POST ACTION=\"post_bug.cgi\">
...@@ -231,7 +242,7 @@ print " ...@@ -231,7 +242,7 @@ print "
<TR>"; <TR>";
if (Param('letsubmitterchoosepriority')) { if (Param('letsubmitterchoosepriority')) {
print " print "
<TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#priority\">Priority</A>:</B></TD> <TD ALIGN=RIGHT><B><A HREF=\"bug_status.html#priority\">Resolution<br>Priority</A>:</B></TD>
<TD>$priority_popup</TD>"; <TD>$priority_popup</TD>";
} else { } else {
print '<INPUT TYPE=HIDDEN NAME=priority VALUE="' . print '<INPUT TYPE=HIDDEN NAME=priority VALUE="' .
...@@ -277,7 +288,7 @@ print " ...@@ -277,7 +288,7 @@ print "
<tr> <tr>
<td></td> <td></td>
<td colspan=5> <td colspan=5>
<INPUT TYPE=\"submit\" VALUE=\" Commit \"> <INPUT TYPE=\"submit\" VALUE=\" Commit \" ONCLICK=\"if (this.form.short_desc.value =='') { alert('Please enter a summary sentence for this bug.'); return false; }\">
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
<INPUT TYPE=\"reset\" VALUE=\"Reset\"> <INPUT TYPE=\"reset\" VALUE=\"Reset\">
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
...@@ -302,5 +313,7 @@ print " ...@@ -302,5 +313,7 @@ print "
<INPUT TYPE=hidden name=form_name VALUE=enter_bug> <INPUT TYPE=hidden name=form_name VALUE=enter_bug>
</FORM>\n"; </FORM>\n";
PutFooter();
print "</BODY></HTML>\n"; print "</BODY></HTML>\n";
...@@ -33,8 +33,10 @@ sub globals_pl_sillyness { ...@@ -33,8 +33,10 @@ sub globals_pl_sillyness {
$zz = @main::db_errstr; $zz = @main::db_errstr;
$zz = @main::default_column_list; $zz = @main::default_column_list;
$zz = @main::dontchange; $zz = @main::dontchange;
$zz = %main::keywordsbyname;
$zz = @main::legal_bug_status; $zz = @main::legal_bug_status;
$zz = @main::legal_components; $zz = @main::legal_components;
$zz = @main::legal_keywords;
$zz = @main::legal_opsys; $zz = @main::legal_opsys;
$zz = @main::legal_platform; $zz = @main::legal_platform;
$zz = @main::legal_priority; $zz = @main::legal_priority;
...@@ -576,12 +578,19 @@ sub RemoveVotes { ...@@ -576,12 +578,19 @@ sub RemoveVotes {
} }
sub Param { sub Param {
my ($value) = (@_); my ($value) = (@_);
if (defined $::param{$value}) { if (defined $::param{$value}) {
return $::param{$value}; return $::param{$value};
} }
# See if it is a dynamically-determined param (can't be changed by user).
if ($value eq "commandmenu") {
return GetCommandMenu();
}
if ($value eq "settingsmenu") {
return GetSettingsMenu();
}
# Um, maybe we haven't sourced in the params at all yet. # Um, maybe we haven't sourced in the params at all yet.
if (stat("data/params")) { if (stat("data/params")) {
# Write down and restore the version # here. That way, we get around # Write down and restore the version # here. That way, we get around
...@@ -607,7 +616,6 @@ sub Param { ...@@ -607,7 +616,6 @@ sub Param {
die "Can't find param named $value"; die "Can't find param named $value";
} }
sub PerformSubsts { sub PerformSubsts {
my ($str, $substs) = (@_); my ($str, $substs) = (@_);
$str =~ s/%([a-z]*)%/(defined $substs->{$1} ? $substs->{$1} : Param($1))/eg; $str =~ s/%([a-z]*)%/(defined $substs->{$1} ? $substs->{$1} : Param($1))/eg;
......
...@@ -49,6 +49,7 @@ if (defined $::FORM{'maketemplate'}) { ...@@ -49,6 +49,7 @@ if (defined $::FORM{'maketemplate'}) {
print "If you put a bookmark <a href=\"$url\">to this link</a>, it will\n"; print "If you put a bookmark <a href=\"$url\">to this link</a>, it will\n";
print "bring up the submit-a-new-bug page with the fields initialized\n"; print "bring up the submit-a-new-bug page with the fields initialized\n";
print "as you've requested.\n"; print "as you've requested.\n";
PutFooter();
exit; exit;
} }
...@@ -61,12 +62,14 @@ if (!defined $::FORM{'component'} || $::FORM{'component'} eq "") { ...@@ -61,12 +62,14 @@ if (!defined $::FORM{'component'} || $::FORM{'component'} eq "") {
print "You must choose a component that corresponds to this bug. If\n"; print "You must choose a component that corresponds to this bug. If\n";
print "necessary, just guess. But please hit the <B>Back</B> button\n"; print "necessary, just guess. But please hit the <B>Back</B> button\n";
print "and choose a component.\n"; print "and choose a component.\n";
PutFooter();
exit 0 exit 0
} }
if (!defined $::FORM{'short_desc'} || trim($::FORM{'short_desc'}) eq "") { if (!defined $::FORM{'short_desc'} || trim($::FORM{'short_desc'}) eq "") {
print "You must enter a summary for this bug. Please hit the\n"; print "You must enter a summary for this bug. Please hit the\n";
print "<B>Back</B> button and try again.\n"; print "<B>Back</B> button and try again.\n";
PutFooter();
exit; exit;
} }
...@@ -173,4 +176,5 @@ print "<BR><A HREF=\"createattachment.cgi?id=$id\">Attach a file to this bug</a> ...@@ -173,4 +176,5 @@ print "<BR><A HREF=\"createattachment.cgi?id=$id\">Attach a file to this bug</a>
navigation_header(); navigation_header();
PutFooter();
exit; exit;
...@@ -97,6 +97,7 @@ if ($::FORM{'product'} ne $::dontchange) { ...@@ -97,6 +97,7 @@ if ($::FORM{'product'} ne $::dontchange) {
print "</form>\n"; print "</form>\n";
print "</hr>\n"; print "</hr>\n";
print "<a href=query.cgi>Cancel all this and go to the query page.</a>\n"; print "<a href=query.cgi>Cancel all this and go to the query page.</a>\n";
PutFooter();
exit; exit;
} }
} }
...@@ -196,6 +197,7 @@ sub CheckonComment( $ ) { ...@@ -196,6 +197,7 @@ sub CheckonComment( $ ) {
"<p>" . "<p>" .
"Please press <b>Back</b> and give some words " . "Please press <b>Back</b> and give some words " .
"on the reason of the your change.\n" ); "on the reason of the your change.\n" );
PutFooter();
exit( 0 ); exit( 0 );
} else { } else {
$ret = 0; $ret = 0;
...@@ -294,6 +296,7 @@ SWITCH: for ($::FORM{'knob'}) { ...@@ -294,6 +296,7 @@ SWITCH: for ($::FORM{'knob'}) {
trim($::FORM{'assigned_to'}) eq "") { trim($::FORM{'assigned_to'}) eq "") {
print "You cannot reassign to a bug to noone. Unless you intentionally cleared out the \"Reassign bug to\" field, "; print "You cannot reassign to a bug to noone. Unless you intentionally cleared out the \"Reassign bug to\" field, ";
print Param("browserbugmessage"); print Param("browserbugmessage");
PutFooter();
exit 0; exit 0;
} }
} }
...@@ -305,11 +308,13 @@ SWITCH: for ($::FORM{'knob'}) { ...@@ -305,11 +308,13 @@ SWITCH: for ($::FORM{'knob'}) {
if ($::FORM{'product'} eq $::dontchange) { if ($::FORM{'product'} eq $::dontchange) {
print "You must specify a product to help determine the new\n"; print "You must specify a product to help determine the new\n";
print "owner of these bugs.\n"; print "owner of these bugs.\n";
PutFooter();
exit 0 exit 0
} }
if ($::FORM{'component'} eq $::dontchange) { if ($::FORM{'component'} eq $::dontchange) {
print "You must specify a component whose owner should get\n"; print "You must specify a component whose owner should get\n";
print "assigned these bugs.\n"; print "assigned these bugs.\n";
PutFooter();
exit 0 exit 0
} }
ChangeStatus('NEW'); ChangeStatus('NEW');
...@@ -344,11 +349,13 @@ SWITCH: for ($::FORM{'knob'}) { ...@@ -344,11 +349,13 @@ SWITCH: for ($::FORM{'knob'}) {
if ($num !~ /^[0-9]*$/) { if ($num !~ /^[0-9]*$/) {
print "You must specify a bug number of which this bug is a\n"; print "You must specify a bug number of which this bug is a\n";
print "duplicate. The bug has not been changed.\n"; print "duplicate. The bug has not been changed.\n";
PutFooter();
exit; exit;
} }
if (defined($::FORM{'id'}) && $::FORM{'dup_id'} == $::FORM{'id'}) { if (defined($::FORM{'id'}) && $::FORM{'dup_id'} == $::FORM{'id'}) {
print "Nice try, $::FORM{'who'}. But it doesn't really make sense to mark a\n"; print "Nice try, $::FORM{'who'}. But it doesn't really make sense to mark a\n";
print "bug as a duplicate of itself, does it?\n"; print "bug as a duplicate of itself, does it?\n";
PutFooter();
exit; exit;
} }
AppendComment($::FORM{'dup_id'}, $::FORM{'who'}, "*** Bug $::FORM{'id'} has been marked as a duplicate of this bug. ***"); AppendComment($::FORM{'dup_id'}, $::FORM{'who'}, "*** Bug $::FORM{'id'} has been marked as a duplicate of this bug. ***");
...@@ -365,6 +372,7 @@ SWITCH: for ($::FORM{'knob'}) { ...@@ -365,6 +372,7 @@ SWITCH: for ($::FORM{'knob'}) {
}; };
# default # default
print "Unknown action $::FORM{'knob'}!\n"; print "Unknown action $::FORM{'knob'}!\n";
PutFooter();
exit; exit;
} }
...@@ -372,6 +380,7 @@ SWITCH: for ($::FORM{'knob'}) { ...@@ -372,6 +380,7 @@ SWITCH: for ($::FORM{'knob'}) {
if ($#idlist < 0) { if ($#idlist < 0) {
print "You apparently didn't choose any bugs to modify.\n"; print "You apparently didn't choose any bugs to modify.\n";
print "<p>Click <b>Back</b> and try again.\n"; print "<p>Click <b>Back</b> and try again.\n";
PutFooter();
exit; exit;
} }
...@@ -388,6 +397,7 @@ if ($::FORM{'keywords'}) { ...@@ -388,6 +397,7 @@ if ($::FORM{'keywords'}) {
print "<P>The legal keyword names are <A HREF=describekeywords.cgi>"; print "<P>The legal keyword names are <A HREF=describekeywords.cgi>";
print "listed here</A>.\n"; print "listed here</A>.\n";
print "<P>Please click the <B>Back</B> button and try again.\n"; print "<P>Please click the <B>Back</B> button and try again.\n";
PutFooter();
exit; exit;
} }
if (!$keywordseen{$i}) { if (!$keywordseen{$i}) {
...@@ -403,7 +413,8 @@ if ($::comma eq "" && 0 == @keywordlist && $keywordaction ne "makeexact") { ...@@ -403,7 +413,8 @@ if ($::comma eq "" && 0 == @keywordlist && $keywordaction ne "makeexact") {
if (!defined $::FORM{'comment'} || $::FORM{'comment'} =~ /^\s*$/) { if (!defined $::FORM{'comment'} || $::FORM{'comment'} =~ /^\s*$/) {
print "Um, you apparently did not change anything on the selected\n"; print "Um, you apparently did not change anything on the selected\n";
print "bugs. <p>Click <b>Back</b> and try again.\n"; print "bugs. <p>Click <b>Back</b> and try again.\n";
exit PutFooter();
exit;
} }
} }
...@@ -501,7 +512,7 @@ The changes made were: ...@@ -501,7 +512,7 @@ The changes made were:
print ", except for the changes to the description"; print ", except for the changes to the description";
} }
print qq{.</form>\n<li><a href="show_bug.cgi?id=$id">Throw away my changes, and go revisit bug $id</a></ul>\n}; print qq{.</form>\n<li><a href="show_bug.cgi?id=$id">Throw away my changes, and go revisit bug $id</a></ul>\n};
navigation_header(); PutFooter();
exit; exit;
} }
...@@ -523,6 +534,7 @@ The changes made were: ...@@ -523,6 +534,7 @@ The changes made were:
if ($comp ne $i) { if ($comp ne $i) {
print "<H1>$i is not a legal bug number</H1>\n"; print "<H1>$i is not a legal bug number</H1>\n";
print "<p>Click <b>Back</b> and try again.\n"; print "<p>Click <b>Back</b> and try again.\n";
PutFooter();
exit; exit;
} }
if (!exists $seen{$i}) { if (!exists $seen{$i}) {
...@@ -541,6 +553,7 @@ The changes made were: ...@@ -541,6 +553,7 @@ The changes made were:
print "The change you are making to dependencies\n"; print "The change you are making to dependencies\n";
print "has caused a circular dependency chain.\n"; print "has caused a circular dependency chain.\n";
print "<p>Click <b>Back</b> and try again.\n"; print "<p>Click <b>Back</b> and try again.\n";
PutFooter();
exit; exit;
} }
if (!exists $seen{$t}) { if (!exists $seen{$t}) {
...@@ -717,4 +730,5 @@ if (defined $::next_bug) { ...@@ -717,4 +730,5 @@ if (defined $::next_bug) {
do "bug_form.pl"; do "bug_form.pl";
} else { } else {
navigation_header(); navigation_header();
PutFooter();
} }
...@@ -212,8 +212,36 @@ sub GetBugText { ...@@ -212,8 +212,36 @@ sub GetBugText {
$::bug{'cclist'} = join(',', @cclist); $::bug{'cclist'} = join(',', @cclist);
$::bug{'voterlist'} = join(',', @voterlist); $::bug{'voterlist'} = join(',', @voterlist);
if (Param("prettyasciimail")) {
my $temp = formline <<'END',$::bug{'short_desc'},$id,$::bug{'product'},$::bug{'bug_status'},$::bug{'version'},$::bug{'resolution'},$::bug{'rep_platform'},$::bug{'bug_severity'},$::bug{'op_sys'},$::bug{'priority'},$::bug{'component'},$::bug{'assigned_to'},$::bug{'reporter'},$qa_contact,DescCC(\@cclist),$target_milestone,${status_whiteboard},$::bug{'bug_file_loc'},DescDependencies($id);
+============================================================================+
| @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
+----------------------------------------------------------------------------+
| Bug #: @<<<<<<<<<<< Product: @<<<<<<<<<<<<<<<<<<<<<< |
| Status: @<<<<<<<<<<<<<<<<<< Version: @<<<<<<<<<<<<<<<<<<<<<< |
| Resolution: @<<<<<<<<<<<<<<<<<< Platform: @<<<<<<<<<<<<<<<<<<<<<< |
| Severity: @<<<<<<<<<<<<<<<<<< OS/Version: @<<<<<<<<<<<<<<<<<<<<<< |
| Priority: @<<<<<<<<<<<<<<<<<< Component: @<<<<<<<<<<<<<<<<<<<<<< |
+----------------------------------------------------------------------------+
| Assigned To: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
| Reported By: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
| ~QA Contact: ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
| ~ CC list: ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
+----------------------------------------------------------------------------+
| ~ Milestone: ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
|~ Whiteboard: ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
| URL: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
|~Dependencies: ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
+============================================================================+
| DESCRIPTION |
END
my $prettymail = $^A . $::bug{'long_desc'};
return $prettymail;
return "Bug\#: $id
} else {
return "Bug\#: $id
Product: $::bug{'product'} Product: $::bug{'product'}
Version: $::bug{'version'} Version: $::bug{'version'}
Platform: $::bug{'rep_platform'} Platform: $::bug{'rep_platform'}
...@@ -230,6 +258,7 @@ $qa_contact$target_milestone${status_whiteboard}URL: $::bug{'bug_file_loc'} ...@@ -230,6 +258,7 @@ $qa_contact$target_milestone${status_whiteboard}URL: $::bug{'bug_file_loc'}
" . DescDependencies($id) . " " . DescDependencies($id) . "
$::bug{'long_desc'} $::bug{'long_desc'}
"; ";
}
} }
...@@ -313,6 +342,7 @@ sub ProcessOneBug { ...@@ -313,6 +342,7 @@ sub ProcessOneBug {
if ($tolist ne "" || $cclist ne "") { if ($tolist ne "" || $cclist ne "") {
my %substs; my %substs;
$substs{"fullbugreport"} = $text; # added ability to include the full bug report
$substs{"to"} = $tolist; $substs{"to"} = $tolist;
$substs{"cc"} = $cclist; $substs{"cc"} = $cclist;
$substs{"bugid"} = $i; $substs{"bugid"} = $i;
...@@ -331,6 +361,7 @@ sub ProcessOneBug { ...@@ -331,6 +361,7 @@ sub ProcessOneBug {
# harmless. # harmless.
open(SENDMAIL, "|/usr/lib/sendmail -t") || open(SENDMAIL, "|/usr/lib/sendmail -t") ||
die "Can't open sendmail"; die "Can't open sendmail";
print SENDMAIL $msg; print SENDMAIL $msg;
close SENDMAIL; close SENDMAIL;
$logstr = "$logstr; mail sent to $tolist, $cclist"; $logstr = "$logstr; mail sent to $tolist, $cclist";
......
...@@ -360,7 +360,7 @@ function selectProduct(f) { ...@@ -360,7 +360,7 @@ function selectProduct(f) {
# set legal_product [concat $default{"product"} [lreplace $legal_product $w $w]] # set legal_product [concat $default{"product"} [lreplace $legal_product $w $w]]
# } # }
PutHeader("Bugzilla Query Page", "Query Page", "", PutHeader("Bugzilla Query Page", "Query", "This page lets you search the database for recorded bugs.",
q{onLoad="selectProduct(document.forms[0]);"}); q{onLoad="selectProduct(document.forms[0]);"});
push @::legal_resolution, "---"; # Oy, what a hack. push @::legal_resolution, "---"; # Oy, what a hack.
...@@ -387,34 +387,29 @@ print " ...@@ -387,34 +387,29 @@ print "
</tr> </tr>
<tr> <tr>
<td align=left valign=top> <td align=left valign=top>
<SELECT NAME=\"bug_status\" MULTIPLE SIZE=7>
@{[make_options(\@::legal_bug_status, $default{'bug_status'}, $type{'bug_status'})]} @{[make_selection_widget(\"bug_status\",\@::legal_bug_status,$default{'bug_status'}, $type{'bug_status'}, 1)]}
</SELECT>
</td> </td>
<td align=left valign=top> <td align=left valign=top>
<SELECT NAME=\"resolution\" MULTIPLE SIZE=7> @{[make_selection_widget(\"resolution\",\@::legal_resolution,$default{'resolution'}, $type{'resolution'}, 1)]}
@{[make_options(\@::legal_resolution, $default{'resolution'}, $type{'resolution'})]}
</SELECT>
</td> </td>
<td align=left valign=top> <td align=left valign=top>
<SELECT NAME=\"rep_platform\" MULTIPLE SIZE=7> @{[make_selection_widget(\"platform\",\@::legal_platform,$default{'platform'}, $type{'platform'}, 1)]}
@{[make_options(\@::legal_platform, $default{'rep_platform'}, $type{'rep_platform'})]}
</SELECT>
</td> </td>
<td align=left valign=top> <td align=left valign=top>
<SELECT NAME=\"op_sys\" MULTIPLE SIZE=7> @{[make_selection_widget(\"op_sys\",\@::legal_platform,$default{'op_sys'}, $type{'op_sys'}, 1)]}
@{[make_options(\@::legal_opsys, $default{'op_sys'}, $type{'op_sys'})]}
</SELECT>
</td> </td>
<td align=left valign=top> <td align=left valign=top>
<SELECT NAME=\"priority\" MULTIPLE SIZE=7> @{[make_selection_widget(\"priority\",\@::legal_priority,$default{'priority'}, $type{'priority'}, 1)]}
@{[make_options(\@::legal_priority, $default{'priority'}, $type{'priority'})]}
</SELECT>
</td> </td>
<td align=left valign=top> <td align=left valign=top>
<SELECT NAME=\"bug_severity\" MULTIPLE SIZE=7> @{[make_selection_widget(\"bug_severity\",\@::legal_severity,$default{'bug_severity'}, $type{'bug_severity'}, 1)]}
@{[make_options(\@::legal_severity, $default{'bug_severity'}, $type{'bug_severity'})]}
</SELECT>
</tr> </tr>
</table> </table>
...@@ -626,3 +621,5 @@ print "<a href=changepassword.cgi>Change your password or preferences.</a><br>\n ...@@ -626,3 +621,5 @@ print "<a href=changepassword.cgi>Change your password or preferences.</a><br>\n
print "<a href=\"enter_bug.cgi\">Create a new bug.</a><br>\n"; print "<a href=\"enter_bug.cgi\">Create a new bug.</a><br>\n";
print "<a href=\"createaccount.cgi\">Open a new Bugzilla account</a><br>\n"; print "<a href=\"createaccount.cgi\">Open a new Bugzilla account</a><br>\n";
print "<a href=\"reports.cgi\">Bug reports</a><br>\n"; print "<a href=\"reports.cgi\">Bug reports</a><br>\n";
PutFooter();
...@@ -40,7 +40,7 @@ do an action that requires a login, you will be prompted for it. ...@@ -40,7 +40,7 @@ do an action that requires a login, you will be prompted for it.
<p> <p>
"; ";
navigation_header(); PutFooter();
exit; exit;
...@@ -96,6 +96,7 @@ else ...@@ -96,6 +96,7 @@ else
print "<font color=blue>$_</font> : " . print "<font color=blue>$_</font> : " .
($::FORM{$_} ? $::FORM{$_} : "undef") . "<br>\n"; ($::FORM{$_} ? $::FORM{$_} : "undef") . "<br>\n";
} }
PutFooter();
exit; exit;
} }
...@@ -104,10 +105,10 @@ else ...@@ -104,10 +105,10 @@ else
print <<FIN; print <<FIN;
<p> <p>
</body>
</html>
FIN FIN
PutFooter();
################################## ##################################
# user came in with no form data # # user came in with no form data #
################################## ##################################
...@@ -308,6 +309,7 @@ FIN ...@@ -308,6 +309,7 @@ FIN
if ($bugs_count == 0) if ($bugs_count == 0)
{ {
print "No bugs found!\n"; print "No bugs found!\n";
PutFooter();
exit; exit;
} }
...@@ -524,6 +526,7 @@ $msg ...@@ -524,6 +526,7 @@ $msg
<p> <p>
FIN FIN
PutFooter();
exit; exit;
} }
......
...@@ -241,3 +241,4 @@ while (@row = FetchSQLData()) { ...@@ -241,3 +241,4 @@ while (@row = FetchSQLData()) {
Status("Sanity check completed."); Status("Sanity check completed.");
PutFooter();
...@@ -35,3 +35,5 @@ ConnectToDatabase(); ...@@ -35,3 +35,5 @@ ConnectToDatabase();
DumpBugActivity($::FORM{'id'}); DumpBugActivity($::FORM{'id'});
print "<hr><a href=show_bug.cgi?id=$::FORM{'id'}>Back to bug $::FORM{'id'}</a>\n"; print "<hr><a href=show_bug.cgi?id=$::FORM{'id'}>Back to bug $::FORM{'id'}</a>\n";
PutFooter();
...@@ -41,6 +41,7 @@ if (!defined $::FORM{'id'} || $::FORM{'id'} !~ /^\s*\d+\s*$/) { ...@@ -41,6 +41,7 @@ if (!defined $::FORM{'id'} || $::FORM{'id'} !~ /^\s*\d+\s*$/) {
print "<INPUT NAME=id>\n"; print "<INPUT NAME=id>\n";
print "<INPUT TYPE=\"submit\" VALUE=\"Show Me This Bug\">\n"; print "<INPUT TYPE=\"submit\" VALUE=\"Show Me This Bug\">\n";
print "</FORM>\n"; print "</FORM>\n";
PutFooter();
exit; exit;
} }
...@@ -53,6 +54,4 @@ print "<HR>\n"; ...@@ -53,6 +54,4 @@ print "<HR>\n";
$! = 0; $! = 0;
do "bug_form.pl" || die "Error doing bug_form.pl: $!"; do "bug_form.pl" || die "Error doing bug_form.pl: $!";
print "</BODY>";
print "</HTML>\n";
...@@ -180,4 +180,4 @@ dependencies</td> ...@@ -180,4 +180,4 @@ dependencies</td>
</form> </form>
"; ";
navigation_header(); PutFooter();
...@@ -100,4 +100,4 @@ print "<h1>Bugs that depend on bug $linkedid</h1>"; ...@@ -100,4 +100,4 @@ print "<h1>Bugs that depend on bug $linkedid</h1>";
undef %seen; undef %seen;
DumpKids($id, "dependson", "blocked"); DumpKids($id, "dependson", "blocked");
navigation_header(); PutFooter();
...@@ -120,5 +120,5 @@ if (defined $::FORM{'bug_id'}) { ...@@ -120,5 +120,5 @@ if (defined $::FORM{'bug_id'}) {
print qq{<a href="votehelp.html">Help! I don't understand this voting stuff</a>}; print qq{<a href="votehelp.html">Help! I don't understand this voting stuff</a>};
navigation_header(); PutFooter();
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