diff options
| author | Nils Adermann <naderman@naderman.de> | 2010-03-02 01:05:35 +0100 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2010-03-02 01:05:35 +0100 |
| commit | 0e0c8d78199cfa2dd56a62266df33655c93367ff (patch) | |
| tree | 757d55e62f00042a60d3988ce7b09588a749bf45 /phpBB/includes/functions_messenger.php | |
| parent | bae824e818fb30260385ed63e6fbea2779a3d19a (diff) | |
| parent | 4319ebbaf6d029bdbb1a9bc6c33c66e62cd486a2 (diff) | |
| download | forums-0e0c8d78199cfa2dd56a62266df33655c93367ff.tar forums-0e0c8d78199cfa2dd56a62266df33655c93367ff.tar.gz forums-0e0c8d78199cfa2dd56a62266df33655c93367ff.tar.bz2 forums-0e0c8d78199cfa2dd56a62266df33655c93367ff.tar.xz forums-0e0c8d78199cfa2dd56a62266df33655c93367ff.zip | |
Merge commit 'release-3.0-RC2'
Diffstat (limited to 'phpBB/includes/functions_messenger.php')
| -rw-r--r-- | phpBB/includes/functions_messenger.php | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index d4052a8968..26ff1491fb 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -1,10 +1,10 @@ <?php -/** +/** * * @package phpBB3 * @version $Id$ -* @copyright (c) 2005 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License * */ @@ -458,7 +458,7 @@ class messenger if (!$use_queue) { include_once($phpbb_root_path . 'includes/functions_jabber.' . $phpEx); - $this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], $config['jab_password'], $config['jab_resource']); + $this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], $config['jab_password'], $config['jab_use_ssl']); if (!$this->jabber->connect()) { @@ -466,19 +466,17 @@ class messenger return false; } - if (!$this->jabber->send_auth()) + if (!$this->jabber->login()) { $this->error('JABBER', 'Could not authorise on Jabber server<br />' . $this->jabber->get_log()); return false; } - $this->jabber->send_presence(NULL, NULL, 'online'); foreach ($addresses as $address) { - $this->jabber->send_message($address, 'normal', NULL, array('body' => $this->msg, 'subject' => $this->subject)); + $this->jabber->send_message($address, $this->msg, $this->subject); } - sleep(1); $this->jabber->disconnect(); } else @@ -592,7 +590,7 @@ class queue } include_once($phpbb_root_path . 'includes/functions_jabber.'.$phpEx); - $this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], $config['jab_password'], $config['jab_resource']); + $this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], $config['jab_password'], $config['jab_use_ssl']); if (!$this->jabber->connect()) { @@ -600,12 +598,11 @@ class queue continue 2; } - if (!$this->jabber->send_auth()) + if (!$this->jabber->login()) { messenger::error('JABBER', 'Could not authorise on Jabber server'); continue 2; } - $this->jabber->send_presence(NULL, NULL, 'online'); break; @@ -647,7 +644,7 @@ class queue case 'jabber': foreach ($addresses as $address) { - if ($this->jabber->send_message($address, 'normal', NULL, array('body' => $msg, 'subject' => $subject)) === false) + if ($this->jabber->send_message($address, $msg, $subject) === false) { messenger::error('JABBER', $this->jabber->get_log()); continue 3; @@ -669,7 +666,6 @@ class queue case 'jabber': // Hang about a couple of secs to ensure the messages are // handled, then disconnect - sleep(1); $this->jabber->disconnect(); break; } |
