You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@hyperreal.org on 1998/01/03 19:17:42 UTC
cvs commit: apache-site bugdb.cgi
coar 98/01/03 10:17:42
Modified: . bugdb.cgi
Log:
Add a checkbox to the edit form to turn off mail notification.
(Useful when making cosmetic changes or altering closed PRs.)
Revision Changes Path
1.23 +27 -13 apache-site/bugdb.cgi
Index: bugdb.cgi
===================================================================
RCS file: /export/home/cvs/apache-site/bugdb.cgi,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- bugdb.cgi 1997/12/30 05:34:21 1.22
+++ bugdb.cgi 1998/01/03 18:17:41 1.23
@@ -102,6 +102,9 @@
# 12/30/1997 Ken Coar - Correct a pointer to the bugdb page, and add the
# actual closure text to the editing display so editors know what will
# be sent.
+# 01/03/1998 Ken Coar - Add a checkbox to the edit form to prevent
+# email from being sent. This allows cosmetic changes to be made,
+# even to closed PRs, without spamming people.
#
### End Modification log
@@ -239,7 +242,7 @@
### Main menu
} elsif ($PATH_INFO eq "") {
&main_menu();
- print "<HR><SMALL>Version: 30 December 1997<BR>Authors: ",
+ print "<HR><SMALL>Version: 3 January 1998<BR>Authors: ",
"<A HREF=\"http://alumni.caltech.edu/~dank/gnats.html\">Dan Kegel ",
"and Huy Le</A>, <BR> ",
"with revamp work by ",
@@ -428,7 +431,7 @@
# Send the PR
$prtext = &unparse_pr("send");
- open(MAIL, "|$MAILER") || die "Error while invoking sendmail";
+ open(MAIL, "|$MAILER") || die "Error while invoking $MAILER";
print MAIL <<EOM;
To: $GNATS_ADDR
Subject:
@@ -875,9 +878,9 @@
# Email-notify all concerned parties
#print "---------------------------------</pre>\n";
- local($mail_to);
+ local($mail_to, $mailed) = ("", 0);
$mail_to = join(", ", sort(keys(%mail_to)));
- if ($mail_to ne "") {
+ if (($mail_to ne "") && (!$input{"NoNotify"})) {
if (open(MAILER, "|$MAILER")) {
$msg =
"To: $mail_to
@@ -892,19 +895,21 @@
";
print MAILER $msg;
close(MAILER);
-
- # Display message
- $msg =~ s/\</\<\;/g;
- $msg =~ s/\>/\>\;/g;
- print
-"<H3>Your changes to PR $pr were filed to the database.</H3>
-The parties concerned were notified via e-mail as follows:
-<br><pre>$msg</pre>
-";
+ $mailed = 1;
} else {
print "Error: can't run $MAILER\n";
}
}
+ # Display message
+ $msg =~ s/\</\<\;/g;
+ $msg =~ s/\>/\>\;/g;
+ print "<H3>Your changes to PR $pr were filed to the database.</H3>";
+ if ($mailed) {
+ print <<EOHT;
+The parties concerned were notified via e-mail as follows:
+<br><pre>$msg</pre>
+EOHT
+ }
}
# Gives the interface to change the PR
@@ -951,6 +956,15 @@
# Maximize box dimensions
local($width)= 60;
local($height)= 4;
+
+ print <<EOHT;
+<DL COMPACT>
+ <DT><INPUT TYPE="checkbox" NAME="NoNotify">
+ </DT>
+ <DD>DO NOT send mail about this change
+ </DD>
+</DL>
+EOHT
print "<dl>
<dt>Editor (you):