svn: /web/php-bugs/trunk/include/ functions.php

From: Date: Thu, 30 Jun 2011 23:03:02 +0000
Subject: svn: /web/php-bugs/trunk/include/ functions.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-11405@lists.php.net to get a copy of this message
felipe Thu, 30 Jun 2011 23:03:02 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=312742 Log: - Ok, the initial mail on creating the report is sent to sec@, fixing the mail when adding comments Changed paths: U web/php-bugs/trunk/include/functions.php Modified: web/php-bugs/trunk/include/functions.php =================================================================== --- web/php-bugs/trunk/include/functions.php 2011-06-30 22:39:57 UTC (rev 312741) +++ web/php-bugs/trunk/include/functions.php 2011-06-30 23:03:02 UTC (rev 312742) @@ -859,7 +859,7 @@ $from = str_replace(array("\n", "\r"), '', $from); /* Default addresses */ - list($mailto, $mailfrom, $Bcc) = 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']); @@ -1029,7 +1029,8 @@ "X-PHP-OS: {$tmp['php_os']}\n" . "X-PHP-Status: {$tmp['new_status']}\n" . "X-PHP-Old-Status: {$tmp['old_status']}\n" . - "In-Reply-To: <bug-{$bug['id']}@{$site_url}>" + "In-Reply-To: <bug-{$bug['id']}@{$site_url}>", + $params ); } @@ -1264,6 +1265,7 @@ global $dbh, $bugEmail, $docBugEmail, $secBugEmail; $to = array(); + $params = ''; if ($bug_type === 'Documentation Problem') { // Documentation problems *always* go to the doc team @@ -1271,6 +1273,7 @@ } else if ($bug_type == 'Security') { // Security problems *always* go to the sec team $to[] = $secBugEmail; + $params = '-f bounce-no-user@php.net'; } else { /* Get package mailing list address */ @@ -1307,9 +1310,9 @@ $bcc = $dbh->prepare("SELECT email FROM bugdb_subscribe WHERE bug_id=?")->execute(array($bug_id))->fetchCol(); $bcc = array_unique($bcc); - return array(implode(', ', $to), $bugEmail, implode(', ', $bcc)); + return array(implode(', ', $to), $bugEmail, implode(', ', $bcc), $params); } else { - return array(implode(', ', $to), $bugEmail); + return array(implode(', ', $to), $bugEmail, $params); } } @@ -1565,8 +1568,11 @@ * @return bool * */ -function bugs_mail($to, $subject, $message, $headers = '', $params = '-f noreply@php.net') +function bugs_mail($to, $subject, $message, $headers = '', $params = '') { + if (empty($params)) { + $params = '-f noreply@php.net'; + } if (DEVBOX === true) { if (defined('DEBUG_MAILS')) { echo '<pre>';

« previous php.webmaster (#11405) next »