From 609c41e4b585232192abba662698288798157297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Mon, 29 Nov 2010 20:59:50 +0200 Subject: Use $USERINFO in mail_setup, as $INFO['userinfo'] is not yet available. 20:51:05 what is the difference between $INFO['userinfo'] and $USERINFO? 20:52:17 none really 20:52:33 yet one works ($USERINFO) and the other doesn't in my setup 20:52:59 $INFO isn't available everywhere 20:53:27 or might not have been set yet (if you're fetching an early action hook) 20:53:27 yeah, mail headers setup failed for me --- inc/mail.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'inc/mail.php') 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@'] = ''; } -- cgit v1.2.3