cvs: pearweb /include pear-config.php /include/pepr pepr.php

From: Date: Tue, 31 Aug 2004 08:37:15 +0000
Subject: cvs: pearweb /include pear-config.php /include/pepr pepr.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-23518@lists.php.net to get a copy of this message
mj Tue Aug 31 04:37:15 2004 EDT Modified files: /pearweb/include pear-config.php /pearweb/include/pepr pepr.php Log: * When PEPr is invoked from a cron job, $auth_user is not set. Noticed by: danielc http://cvs.php.net/diff.php/pearweb/include/pear-config.php?r1=1.24&r2=1.25&ty=u Index: pearweb/include/pear-config.php diff -u pearweb/include/pear-config.php:1.24 pearweb/include/pear-config.php:1.25 --- pearweb/include/pear-config.php:1.24 Mon Aug 30 16:40:39 2004 +++ pearweb/include/pear-config.php Tue Aug 31 04:37:14 2004 @@ -14,7 +14,7 @@ * @category pearweb * @copyright Copyright (c) 1997-2004 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: pear-config.php,v 1.24 2004/08/30 20:40:39 mj Exp $ + * @version $Id: pear-config.php,v 1.25 2004/08/31 08:37:14 mj Exp $ */ if (isset($_SERVER['PEAR_TMPDIR'])) { @@ -230,6 +230,21 @@ * before this file is included. */ define('PROPOSAL_MAIL_PEAR_GROUP', 'PEAR group <pear-group@php.net>'); +} + +if (isset($_SERVER['PROPOSAL_MAIL_FROM'])) { + /** + * @ignore + */ + define('PROPOSAL_MAIL_FROM', $_SERVER['PROPOSAL_MAIL_FROM']); +} else { + /** + * PEPr: the email address used as the From header + * + * To override default, set the value in $_SERVER['PROPOSAL_MAIL_FROM'] + * before this file is included. + */ + define('PROPOSAL_MAIL_FROM', 'PEPr <pear-sys@php.net>'); } /** http://cvs.php.net/diff.php/pearweb/include/pepr/pepr.php?r1=1.45&r2=1.46&ty=u Index: pearweb/include/pepr/pepr.php diff -u pearweb/include/pepr/pepr.php:1.45 pearweb/include/pepr/pepr.php:1.46 --- pearweb/include/pepr/pepr.php:1.45 Mon Aug 30 16:37:56 2004 +++ pearweb/include/pepr/pepr.php Tue Aug 31 04:37:15 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.45 2004/08/30 20:37:56 mj Exp $ + * @version $Id: pepr.php,v 1.46 2004/08/31 08:37:15 mj Exp $ */ /**#@+ @@ -625,7 +625,12 @@ $email = preg_replace($replace, $replacements, $email); $email['text'] .= PROPOSAL_EMAIL_POSTFIX; - $from = '"' . $auth_user->name . '" <' . $auth_user->email . '>'; + if (is_object($auth_user)) { + $from = '"' . $auth_user->name . '" <' . $auth_user->email . '>'; + } else { + $from = PROPOSAL_MAIL_FROM ; + } + $to = explode(", ", $email['to']); $email['to'] = array_shift($to); $headers = "CC: ". implode(", ", $to) . "\n";

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