cvs: pearweb /public_html/bugs report.php /public_html/bugs/include functions.inc

From: Date: Wed, 22 Feb 2006 12:47:10 +0000
Subject: cvs: pearweb /public_html/bugs report.php /public_html/bugs/include functions.inc
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-38490@lists.php.net to get a copy of this message
pajoye Wed Feb 22 12:47:10 2006 UTC Modified files: /pearweb/public_html/bugs report.php /pearweb/public_html/bugs/include functions.inc Log: - #6865, get_package_mail, makes bug_id optionnal http://cvs.php.net/viewcvs.cgi/pearweb/public_html/bugs/report.php?r1=1.58&r2=1.59&diff_format=u Index: pearweb/public_html/bugs/report.php diff -u pearweb/public_html/bugs/report.php:1.58 pearweb/public_html/bugs/report.php:1.59 --- pearweb/public_html/bugs/report.php:1.58 Mon Feb 20 18:05:13 2006 +++ pearweb/public_html/bugs/report.php Wed Feb 22 12:47:10 2006 @@ -17,7 +17,7 @@ * @package Bugs * @copyright Copyright (c) 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: report.php,v 1.58 2006/02/20 18:05:13 pajoye Exp $ + * @version $Id: report.php,v 1.59 2006/02/22 12:47:10 pajoye Exp $ */ /** @@ -218,8 +218,7 @@ $ascii_report .= "\n-- \nEdit bug report at "; $ascii_report .= "http://$site.php.net/bugs/bug.php?id=$cid&edit="; - list($mailto, $mailfrom) = get_package_mail( - $_POST['in']['package_name']); + list($mailto, $mailfrom) = get_package_mail($_POST['in']['package_name']); $email = rinse($_POST['in']['email']); $protected_email = '"' . spam_protect($email, 'text') . '"'; http://cvs.php.net/viewcvs.cgi/pearweb/public_html/bugs/include/functions.inc?r1=1.99&r2=1.100&diff_format=u Index: pearweb/public_html/bugs/include/functions.inc diff -u pearweb/public_html/bugs/include/functions.inc:1.99 pearweb/public_html/bugs/include/functions.inc:1.100 --- pearweb/public_html/bugs/include/functions.inc:1.99 Wed Feb 22 01:53:52 2006 +++ pearweb/public_html/bugs/include/functions.inc Wed Feb 22 12:47:10 2006 @@ -15,7 +15,7 @@ * @package Bugs * @copyright Copyright (c) 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: functions.inc,v 1.99 2006/02/22 01:53:52 pajoye Exp $ + * @version $Id: functions.inc,v 1.100 2006/02/22 12:47:10 pajoye Exp $ */ @@ -1007,7 +1007,7 @@ * * @return array an array of eamil addresses */ -function get_package_mail($package_name, $bug_id) +function get_package_mail($package_name, $bug_id=false) { global $site, $bugEmail, $dbh; // XXX Change to pear-bugs when it gets opened @@ -1028,11 +1028,16 @@ foreach ($maintainers as $data) { $to[] = $data['email']; } + /* subscription */ - $bcc = $dbh->getCol('SELECT email FROM bugdb_subscribe WHERE bug_id=' . $bug_id); - $bcc = array_diff($bcc, $to); - $bcc = array_unique($bcc); - return array(implode(', ', $to), $bugEmail, implode(', ', $bcc)); + if ($bug_id) { + $bcc = $dbh->getCol('SELECT email FROM bugdb_subscribe WHERE bug_id=' . $bug_id); + $bcc = array_diff($bcc, $to); + $bcc = array_unique($bcc); + return array(implode(', ', $to), $bugEmail, implode(', ', $bcc)); + } else { + return array(implode(', ', $to), $bugEmail); + } } /**

« previous php.pear.cvs (#38490) next »