cvs: php-bugs-web / bug.php report.php /include functions.inc
| From: | Jani Taskinen | Date: | Fri, 26 Jul 2002 19:50:35 +0000 |
| Subject: | cvs: php-bugs-web / bug.php report.php /include functions.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-11572@lists.php.net to get a copy of this message | ||
sniper Fri Jul 26 15:50:35 2002 EDT
Modified files:
/php-bugs-web bug.php report.php
/php-bugs-web/include functions.inc
Log:
Changed the Subject: to not include "Bug" in it and shows the status
Index: php-bugs-web/bug.php
diff -u php-bugs-web/bug.php:1.38 php-bugs-web/bug.php:1.39
--- php-bugs-web/bug.php:1.38 Tue Jul 2 19:08:55 2002
+++ php-bugs-web/bug.php Fri Jul 26 15:50:35 2002
@@ -141,7 +141,7 @@
}
if ($in && !$errors && $success) {
- mail_bug_updates($bug,$in,$from,$ncomment);
+ mail_bug_updates($bug,$in,$from,$ncomment,$edit);
header("Location: $PHP_SELF?id=$id&thanks=$edit");
exit;
}
Index: php-bugs-web/report.php
diff -u php-bugs-web/report.php:1.24 php-bugs-web/report.php:1.25
--- php-bugs-web/report.php:1.24 Thu Jul 4 03:58:29 2002
+++ php-bugs-web/report.php Fri Jul 26 15:50:35 2002
@@ -58,7 +58,7 @@
}
# mail to appropriate mailing lists
- if (mail($mailto, "Bug #$cid: $sdesc", $ascii_report."1\n--
\n$dev_extra", "From: $email\nX-PHP-Bug: $cid\nMessage-ID:
<bug-$cid@bugs.php.net>")) {
+ if (mail($mailto, "#$cid [NEW]: $sdesc", $ascii_report."1\n--
\n$dev_extra", "From: $email\nX-PHP-Bug: $cid\nMessage-ID:
<bug-$cid@bugs.php.net>")) {
# mail to reporter
@mail($email, "Bug #$cid: $sdesc", $ascii_report."2\n", "From:
PHP Bug Database <$mailfrom>\nX-PHP-Bug: $cid\nMessage-ID:
<bug-$cid@bugs.php.net>");
Index: php-bugs-web/include/functions.inc
diff -u php-bugs-web/include/functions.inc:1.39 php-bugs-web/include/functions.inc:1.40
--- php-bugs-web/include/functions.inc:1.39 Tue Jul 23 02:46:24 2002
+++ php-bugs-web/include/functions.inc Fri Jul 26 15:50:35 2002
@@ -174,7 +174,7 @@
}
}
-function mail_bug_updates($bug, $in, $from, $ncomment)
+function mail_bug_updates($bug, $in, $from, $ncomment, $edit=1)
{
$text = array();
$headers = array();
@@ -258,15 +258,24 @@
list($mailto,$mailfrom) =
get_bugtype_mail(oneof($in['bug_type'],$bug['bug_type']));
/* send mail if status was changed or there is a comment */
- if ($status != $bug[status] || $ncomment != "") {
+ if ($in[status] != $bug[status] || $ncomment != "") {
+
+ if ($in[status] != $bug[status]) { /* status changed */
+ $subj = "#{$bug['id']}
[{$bug['status']}->{$in['status']}]: ";
+ } elseif ($edit == 3) { /* comment */
+ $subj = "#{$bug['id']} [Comment]: ";
+ } else { /* status did not change and not comment */
+ $subj = "#{$bug['id']} [{$bug['status']}]: ";
+ }
+
@mail($bug[email],
- "Bug #$bug[id] Updated: ".txfield('sdesc'),
+ "Bug $subj" . txfield('sdesc'),
$user_text,
"From: PHP Bug Database <$mailfrom>\n".
"X-PHP-Bug: $bug[id]\n".
"In-Reply-To: <bug-$bug[id]@bugs.php.net>");
@mail($mailto,
- "Bug #$bug[id] Updated: ".txfield('sdesc'),
+ $subj . txfield('sdesc'),
$dev_text,
"From: $from\n".
"X-PHP-Bug: $bug[id]\n".