From 9da094fec24666b80349cc73978c26ba76105153 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Sun, 12 Oct 2003 15:29:18 +0000 Subject: Updated the various "users of emailer", fixed issue(!) of jabber using the email address as the uid, blah fixes, blah, blah di blah yakety smackety git-svn-id: file:///svn/phpbb/trunk@4583 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_messenger.php | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'phpBB/includes/functions_messenger.php') diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 79fc1bdd14..28cd796507 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -19,6 +19,18 @@ class messenger var $tpl_msg = array(); + function messenger() + { + global $config; + + if (preg_match('#^[c-z]:\\\#i', getenv('PATH')) && !$config['smtp_delivery'] && phpversion() < '4.3') + { + // We are running on windows, force delivery to use our smtp functions since php's are broken by default + $config['smtp_delivery'] = 1; + $config['smtp_host'] = @ini_get('SMTP'); + } + } + // Resets all the data (address, template file, etc etc to default function reset() { @@ -47,6 +59,13 @@ class messenger // $this->addresses['bcc'][$pos]['name'] = trim($realname); } + function im($address, $realname = '') + { + $pos = sizeof($this->addresses['im']); + $this->addresses['im'][$pos]['uid'] = trim($address); + $this->addresses['im'][$pos]['name'] = trim($realname); + } + function replyto($address) { $this->replyto = trim($address); @@ -305,17 +324,12 @@ class messenger } $addresses = array(); - foreach ($this->addresses as $type => $address_ary) + foreach ($this->addresses['im'] as $type => $uid_ary) { - foreach ($address_ary as $which_ary) - { - $addresses[] = $which_ary['email']; - } + $addresses[] = $uid_ary['uid']; } $addresses = array_unique($addresses); - $subject = sprintf($user->lang['IM_JABBER_SUBJECT'], $user->data['username'], $config['server_name']); - if (!$use_queue) { include_once($phpbb_root_path . 'includes/functions_jabber.'.$phpEx); -- cgit v1.2.1