summaryrefslogtreecommitdiff
path: root/inc/mail.php
diff options
context:
space:
mode:
authorElan Ruusamäe <glen@delfi.ee>2010-11-29 20:59:50 +0200
committerElan Ruusamäe <glen@delfi.ee>2010-11-29 21:41:25 +0200
commit609c41e4b585232192abba662698288798157297 (patch)
treea1d69313b1813762a6a857432f6ac3191bc6692c /inc/mail.php
parentc0470665eec5d52d0e7da72e5ba8fd76b931247d (diff)
downloadrpg-609c41e4b585232192abba662698288798157297.tar.gz
rpg-609c41e4b585232192abba662698288798157297.tar.bz2
Use $USERINFO in mail_setup, as $INFO['userinfo'] is not yet available.
20:51:05 <glen> what is the difference between $INFO['userinfo'] and $USERINFO? 20:52:17 <splitbrain> none really 20:52:33 <glen> yet one works ($USERINFO) and the other doesn't in my setup 20:52:59 <splitbrain> $INFO isn't available everywhere 20:53:27 <splitbrain> or might not have been set yet (if you're fetching an early action hook) 20:53:27 <glen> yeah, mail headers setup failed for me
Diffstat (limited to 'inc/mail.php')
-rw-r--r--inc/mail.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/inc/mail.php b/inc/mail.php
index fb163585a..604a0999a 100644
--- a/inc/mail.php
+++ b/inc/mail.php
@@ -37,12 +37,12 @@ if (!defined('PREG_PATTERN_VALID_EMAIL')) define('PREG_PATTERN_VALID_EMAIL', '['
*/
function mail_setup(){
global $conf;
- global $INFO;
+ global $USERINFO;
$replace = array();
- if(!empty($INFO['userinfo']['mail'])){
- $replace['@MAIL@'] = $INFO['userinfo']['mail'];
+ if(!empty($USERINFO['mail'])){
+ $replace['@MAIL@'] = $USERINFO['mail'];
}else{
$replace['@MAIL@'] = 'noreply@'.parse_url(DOKU_URL,PHP_URL_HOST);
}
@@ -53,8 +53,8 @@ function mail_setup(){
$replace['@USER@'] = 'noreply';
}
- if(!empty($INFO['userinfo']['name'])){
- $replace['@NAME@'] = $INFO['userinfo']['name'];
+ if(!empty($USERINFO['name'])){
+ $replace['@NAME@'] = $USERINFO['name'];
}else{
$replace['@NAME@'] = '';
}