com web/bugs: make the return value of get_package_mail( ) more consistent. previously the third item of the returned array could contain either the
bcc or the params based on one of the input arguments: include/functions.php scripts/cron/no-fee dback www/report.php
| From: | Ferenc Kovacs | Date: | Sun, 17 Feb 2013 23:05:43 +0000 |
| Subject: | com web/bugs: make the return value of get_package_mail( ) more consistent. previously the third item of the returned array could contain either the bcc or the params based on one of the input arguments: include/functions.php scripts/cron/no-fee dback www/report.php |
||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-15492@lists.php.net to get a copy of this message | ||
Commit: 99803ca6767c6155bf6dc9614d9c0a520b819344
Author: Ferenc Kovacs <tyra3l@gmail.com> Mon, 18 Feb 2013 00:05:43 +0100
Parents: aa2e2a31c113b29bba07465ba66a81c7f2b44b4b
Branches: master
Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=99803ca6767c6155bf6dc9614d9c0a520b819344
Log:
make the return value of get_package_mail() more consistent. previously the third item of the
returned array could contain either the bcc or the params based on one of the input arguments
Changed paths:
M include/functions.php
M scripts/cron/no-feedback
M www/report.php
Diff:
diff --git a/include/functions..php b/include/functions.php
index 8120e93..0067ff5 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -942,7 +942,7 @@ function mail_bug_updates($bug, $in, $from, $ncomment, $edit = 1, $id = false)
$from = str_replace(array("\n", "\r"), '', $from);
/* Default addresses */
- list($mailto, $mailfrom, $Bcc, $params) = get_package_mail(oneof(@$in['package_name'],
$bug['package_name']), $id, oneof(@$in['bug_type'],
$bug['bug_type']));
+ list($mailto, $mailfrom, $bcc, $params) = get_package_mail(oneof(@$in['package_name'],
$bug['package_name']), $id, oneof(@$in['bug_type'],
$bug['bug_type']));
$headers[] = array(' ID', $bug['id']);
@@ -1084,7 +1084,7 @@ DEV_TEXT;
"{$subj}: {$sdesc}",
$user_text,
"From: {$siteBig} Bug Database <{$mailfrom}>\n" .
- "Bcc: {$Bcc}\n" .
+ "Bcc: {$bcc}\n" .
"X-PHP-Bug: {$bug['id']}\n" .
"X-PHP-Site: {$siteBig}\n" .
"In-Reply-To: <bug-{$bug['id']}@{$site_url}>"
@@ -1417,7 +1417,7 @@ function get_package_mail($package_name, $bug_id = false, $bug_type =
'Bug')
$bcc = array_unique($bcc);
return array(implode(', ', $to), $mailfrom, implode(', ', $bcc), $params);
} else {
- return array(implode(', ', $to), $mailfrom, $params);
+ return array(implode(', ', $to), $mailfrom, '', $params);
}
}
diff --git a/scripts/cron/no-feedback b/scripts/cron/no-feedback
index 1581145..34f364d 100755
--- a/scripts/cron/no-feedback
+++ b/scripts/cron/no-feedback
@@ -27,7 +27,7 @@ if ($dbh)
}
while ($bug = $res->fetchRow(MDB2_FETCHMODE_ASSOC))
{
- list($mailto, $mailfrom) = get_package_mail($bug['package_name'], false,
$bug['bug_type']);
+ list($mailto, $mailfrom, $bcc, $params) = get_package_mail($bug['package_name'], false,
$bug['bug_type']);
// No feedback message
if (isset($FIX_VARIATIONS) &&
isset($FIX_VARIATIONS['nofeedback'][$bug['package_name']])) {
diff --git a/www/report.php b/www/report.php
index 562c87c..20d22d7 100644
--- a/www/report.php
+++ b/www/report.php
@@ -250,7 +250,7 @@ REPORT;
$ascii_report.= "\n-- \nEdit bug report at ";
$ascii_report.= "{$site_method}://{$site_url}{$basedir}/bug.php?id=$cid&edit=";
- list($mailto, $mailfrom, $params) = get_package_mail($package_name, false,
$_POST['in']['bug_type']);
+ list($mailto, $mailfrom, $bcc, $params) = get_package_mail($package_name, false,
$_POST['in']['bug_type']);
$protected_email = '"' . spam_protect($_POST['in']['email'],
'text') . '"' . "<{$mailfrom}>";