mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-09 10:16:36 +02:00
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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user