cvs: docweb /include/rfc rfc.php
| From: | Vincent Gevers | Date: | Tue, 31 Aug 2004 11:41:59 +0000 |
| Subject: | cvs: docweb /include/rfc rfc.php | ||
| Groups: | php.doc.web | ||
| Request: | Send a blank email to doc-web+get-206@lists.php.net to get a copy of this message | ||
vincent Tue Aug 31 07:41:59 2004 EDT
Modified files:
/docweb/include/rfc rfc.php
Log:
PEPr patch
$auth will be used for logins and user info
http://cvs.php.net/diff.php/docweb/include/rfc/rfc.php?r1=1.2&r2=1.3&ty=u
Index: docweb/include/rfc/rfc.php
diff -u docweb/include/rfc/rfc.php:1.2 docweb/include/rfc/rfc.php:1.3
--- docweb/include/rfc/rfc.php:1.2 Thu Aug 19 06:30:53 2004
+++ docweb/include/rfc/rfc.php Tue Aug 31 07:41:59 2004
@@ -24,7 +24,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: rfc.php,v 1.2 2004/08/19 10:30:53 vincent Exp $
+ * @version $Id: rfc.php,v 1.3 2004/08/31 11:41:59 vincent Exp $
*/
require_once 'DB.php';
@@ -710,14 +710,14 @@
function sendActionEmail($event, $userType, $user_handle = null, $comment = '')
{ // !!!
- global $dbh, $karma;
+ global $dbh, $karma, $auth;
if (empty($karma)) {
// $karma =& new Damblan_Karma($dbh); // !!!
}
-
- $master_url = get_resource_url();
- require dirname(__FILE__) . '/rfc-emails.php';
+
+ $master_url = get_resource_url();
+ require dirname(__FILE__) . '/rfc-emails.php';
$email = $proposalEmailTexts[$event];
if (empty($email)) {
return PEAR::raiseError("Email template for $event not found");
@@ -813,7 +813,7 @@
(isset($vote)) ? $vote_url : "",
PROPOSAL_MAIL_DOC_DEV,
PROPOSAL_MAIL_DOC_GROUP,
- (isset($comment)) ? $comment : '',
+ (isset($comment)) ? wordwrap($comment) : '',
(isset($vote_result)) ? $vote_result : '',
(isset($vote_conditional)) ? $vote_conditional : ""
);
@@ -821,15 +821,26 @@
$email = preg_replace($replace, $replacements, $email);
$email['text'] .= PROPOSAL_EMAIL_POSTFIX;
+ if (is_object($auth)) {
+ $from = '"' . $auth->name . '" <' . $auth->email
. '>';
+ } else {
+ $from = PROPOSAL_MAIL_FROM ;
+ }
+
$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: " . "RFC, Docweb Proposal System <http://docs.php.net/>" . "\n"; // !!!
$headers .= "X-RFC-Category: " . $this->pkg_category . "\n";
$headers .= "X-RFC-Name: " . $this->pkg_name . "\n";
$headers .= "X-RFC-Status: " . $this->getStatus() . "\n";
+
+ if ($event == "change_status_proposal") {
+ $headers .= "Message-ID: <proposal-" . $this->id .
"@doc.php.net>\n";
+ } else {
+ $headers .= "In-Reply-To: <proposal-" . $this->id .
"@doc.php.net>\n";
+ }
$res = mail($email['to'], $email['subject'], $email['text'],
$headers, '-f doc-web@lists.php.net'); // !!!