diff options
author | Elan Ruusamäe <glen@delfi.ee> | 2010-11-29 20:59:50 +0200 |
---|---|---|
committer | Elan Ruusamäe <glen@delfi.ee> | 2010-11-29 21:41:25 +0200 |
commit | 609c41e4b585232192abba662698288798157297 (patch) | |
tree | a1d69313b1813762a6a857432f6ac3191bc6692c | |
parent | c0470665eec5d52d0e7da72e5ba8fd76b931247d (diff) | |
download | rpg-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
-rw-r--r-- | inc/mail.php | 10 |
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@'] = ''; } |