cvs: pearweb /public_html/bugs report.php /public_html/bugs/include functions.inc
| From: | Martin Jansen | Date: | Sun, 18 Jan 2004 18:39:58 +0000 |
| Subject: | cvs: pearweb /public_html/bugs report.php /public_html/bugs/include functions.inc | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-15766@lists.php.net to get a copy of this message | ||
mj Sun Jan 18 13:39:58 2004 EDT
Modified files:
/pearweb/public_html/bugs report.php
/pearweb/public_html/bugs/include functions.inc
Log:
* Don't send bug mails on development setups
* Don't assume that every PEAR developer has a @php.net email address.
Thus assignment notifications are not send to <handle>@php.net, but to
the address that is stored in the user table.
Index: pearweb/public_html/bugs/report.php
diff -u pearweb/public_html/bugs/report.php:1.11 pearweb/public_html/bugs/report.php:1.12
--- pearweb/public_html/bugs/report.php:1.11 Fri Oct 24 09:27:53 2003
+++ pearweb/public_html/bugs/report.php Sun Jan 18 13:39:57 2004
@@ -181,12 +181,14 @@
$extra_headers.= "X-PHP-Status: Open\n";
$extra_headers.= "Message-ID: <bug-$cid@pear.php.net>";
- // mail to package developers
- mail($mailto, "[PEAR-BUG] #$cid [NEW]: $sdesc", $ascii_report."1\n--
\n$dev_extra", $extra_headers, "-fpear-sys@php.net");
- // mail to reporter
- mail($email, "[PEAR-BUG] Bug #$cid: $sdesc", $ascii_report."2\n",
"From: PHP Bug Database <$mailfrom>\nX-PHP-Bug: $cid\nMessage-ID:
<bug-$cid@pear.php.net>", "-fpear-sys@php.net");
- header("Location: bug.php?id=$cid&thanks=4");
- exit;
+ if (DEVBOX == false) {
+ // mail to package developers
+ mail($mailto, "[PEAR-BUG] #$cid [NEW]: $sdesc", $ascii_report."1\n--
\n$dev_extra", $extra_headers, "-fpear-sys@php.net");
+ // mail to reporter
+ mail($email, "[PEAR-BUG] Bug #$cid: $sdesc",
$ascii_report."2\n", "From: PHP Bug Database <$mailfrom>\nX-PHP-Bug:
$cid\nMessage-ID: <bug-$cid@pear.php.net>", "-fpear-sys@php.net");
+ header("Location: bug.php?id=$cid&thanks=4");
+ exit;
+ }
}
} else {
response_header("Report - Problems");
Index: pearweb/public_html/bugs/include/functions.inc
diff -u pearweb/public_html/bugs/include/functions.inc:1.14
pearweb/public_html/bugs/include/functions.inc:1.15
--- pearweb/public_html/bugs/include/functions.inc:1.14 Fri Jan 9 07:08:06 2004
+++ pearweb/public_html/bugs/include/functions.inc Sun Jan 18 13:39:58 2004
@@ -331,42 +331,50 @@
}
# the user gets sent mail with an envelope sender that ignores bounces
- @mail($bug[email],
- "[PEAR-BUG] Bug " . rinse($subj) . txfield('sdesc'),
- $user_text,
- "From: PHP Bug Database <$mailfrom>\n".
- "X-PHP-Bug: $bug[id]\n".
- "In-Reply-To: <bug-$bug[id]@pear.php.net>",
- "-fbounces-ignored@php.net");
- # but we go ahead and let the default sender get used for the list
- @mail($mailto,
- "[PEAR-BUG] " . rinse($subj) . txfield('sdesc'),
- $dev_text,
- "From: $from\n".
- "X-PHP-Bug: $bug[id]\n".
- "X-PHP-Version: " . stripslashes((($edit != 3) ? $in['php_version']
: $bug['php_version'])) . "\n" .
- "X-PHP-Category: " . stripslashes((($edit != 3) ? $in['bug_type']
: $bug['bug_type'])) . "\n" .
- "X-PHP-OS: " . stripslashes((($edit != 3) ? $in['php_os']
: $bug['php_os'])) . "\n" .
- "X-PHP-Status: " . stripslashes($new_status) . "\n" .
- "X-PHP-Old-Status: " . stripslashes($old_status) . "\n" .
- "In-Reply-To: <bug-$bug[id]@pear.php.net>",
- "-fpear-sys@php.net");
+ if (DEVBOX == false) {
+ @mail($bug[email],
+ "[PEAR-BUG] Bug " . rinse($subj) . txfield('sdesc'),
+ $user_text,
+ "From: PHP Bug Database <$mailfrom>\n".
+ "X-PHP-Bug: $bug[id]\n".
+ "In-Reply-To: <bug-$bug[id]@pear.php.net>",
+ "-fbounces-ignored@php.net");
+ # but we go ahead and let the default sender get used for the list
+ @mail($mailto,
+ "[PEAR-BUG] " . rinse($subj) . txfield('sdesc'),
+ $dev_text,
+ "From: $from\n".
+ "X-PHP-Bug: $bug[id]\n".
+ "X-PHP-Version: " . stripslashes((($edit != 3) ?
$in['php_version'] : $bug['php_version'])) . "\n" .
+ "X-PHP-Category: " . stripslashes((($edit != 3) ? $in['bug_type']
: $bug['bug_type'])) . "\n" .
+ "X-PHP-OS: " . stripslashes((($edit != 3) ? $in['php_os']
: $bug['php_os'])) . "\n" .
+ "X-PHP-Status: " . stripslashes($new_status) . "\n" .
+ "X-PHP-Old-Status: " . stripslashes($old_status) . "\n" .
+ "In-Reply-To: <bug-$bug[id]@pear.php.net>",
+ "-fpear-sys@php.net");
+ }
}
/* if a developer assigns someone else, let that other person know about it */
- if ($edit == 1 && $in['assign'] && $in['assign'] !=
$bug['assign']
- && ($in['assign'] . "@php.net") != $from) {
+ if ($edit == 1 && $in['assign'] && $in['assign'] !=
$bug['assign']) {
- $unknowing_victim = $in['assign'] . '@php.net';
+ $info = user::info($in['assign'], "email");
+ $email = $info['email'];
- @mail($unknowing_victim,
- rinse($subj) . txfield('sdesc'),
- wordwrap($unknowing_victim . ' you have just been assigned to this bug by ' .
$from . "\n\n") .
- $dev_text,
- "From: $from\n".
- "X-PHP-Bug: $bug[id]\n".
- "In-Reply-To: <bug-$bug[id]@pear.php.net>",
- "-fpear-sys@php.net");
+ if ($email == $from) {
+ return;
+ }
+
+ if (DEVBOX == false) {
+ @mail($email,
+ rinse($subj) . txfield('sdesc'),
+ wordwrap($in['assign'] . ' you have just been assigned to this bug by
' . $from . "\n\n") .
+ $dev_text,
+ "From: $from\n".
+ "X-PHP-Bug: $bug[id]\n".
+ "In-Reply-To: <bug-$bug[id]@pear.php.net>",
+ "-fpear-sys@php.net");
+ }
}
}