cvs: pearweb /include/pepr pepr.php

From: Date: Mon, 30 Aug 2004 20:37:56 +0000
Subject: cvs: pearweb /include/pepr pepr.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-23512@lists.php.net to get a copy of this message
mj Mon Aug 30 16:37:56 2004 EDT Modified files: /pearweb/include/pepr pepr.php Log: * Implemented basic threading capabilities for PEPr emails * Use the developer's real name and email address for PEPr emails * Adding wrapping of comments in PEPr emails http://cvs.php.net/diff.php/pearweb/include/pepr/pepr.php?r1=1.44&r2=1.45&ty=u Index: pearweb/include/pepr/pepr.php diff -u pearweb/include/pepr/pepr.php:1.44 pearweb/include/pepr/pepr.php:1.45 --- pearweb/include/pepr/pepr.php:1.44 Thu Aug 12 12:30:15 2004 +++ pearweb/include/pepr/pepr.php Mon Aug 30 16:37:56 2004 @@ -22,7 +22,7 @@ * @author Daniel Convissor <danielc@php.net> * @copyright Copyright (c) 1997-2004 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: pepr.php,v 1.44 2004/08/12 16:30:15 danielc Exp $ + * @version $Id: pepr.php,v 1.45 2004/08/30 20:37:56 mj Exp $ */ /**#@+ @@ -516,7 +516,7 @@ function sendActionEmail($event, $userType, $user_handle = null, $comment = '') { - global $dbh, $karma; + global $dbh, $karma, $auth_user; if (empty($karma)) { $karma =& new Damblan_Karma($dbh); @@ -617,7 +617,7 @@ (isset($vote)) ? $vote_url : "", PROPOSAL_MAIL_PEAR_DEV, PROPOSAL_MAIL_PEAR_GROUP, - (isset($comment)) ? $comment : '', + (isset($comment)) ? wordwrap($comment) : '', (isset($vote_result)) ? $vote_result : '', (isset($vote_conditional)) ? $vote_conditional : "" ); @@ -625,15 +625,21 @@ $email = preg_replace($replace, $replacements, $email); $email['text'] .= PROPOSAL_EMAIL_POSTFIX; + $from = '"' . $auth_user->name . '" <' . $auth_user->email . '>'; $to = explode(", ", $email['to']); $email['to'] = array_shift($to); $headers = "CC: ". implode(", ", $to) . "\n"; - $headers .= "From: " . PROPOSAL_MAIL_FROM . "\n"; - $headers .= "Reply-To: " . $actorinfo['email'] . "\n"; + $headers .= "From: " . $from . "\n"; $headers .= "X-Mailer: " . "PEPr, PEAR Proposal System" . "\n"; $headers .= "X-PEAR-Category: " . $this->pkg_category . "\n"; $headers .= "X-PEAR-Package: " . $this->pkg_name . "\n"; $headers .= "X-PEPr-Status: " . $this->getStatus() . "\n"; + + if ($event == "change_status_proposal") { + $headers .= "Message-ID: <proposal-" . $this->id . "@pear.php.net>\n"; + } else { + $headers .= "In-Reply-To: <proposal-" . $this->id . "@pear.php.net>\n"; + } $res = mail($email['to'], $email['subject'], $email['text'], $headers, '-f pear-sys@php.net');

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