mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-26 13:18:54 +00:00
Don't trigger_error when connect fails in queue, continue queue processing of next object on email/jabber failure
git-svn-id: file:///svn/phpbb/trunk@4599 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
fadcec80c2
commit
038f43c3fd
1 changed files with 7 additions and 8 deletions
|
@ -425,8 +425,9 @@ class queue
|
||||||
|
|
||||||
foreach ($this->queue_data as $object => $data_ary)
|
foreach ($this->queue_data as $object => $data_ary)
|
||||||
{
|
{
|
||||||
$package_size = $data_ary['package_size'];
|
@set_time_limit(60);
|
||||||
|
|
||||||
|
$package_size = $data_ary['package_size'];
|
||||||
$num_items = (count($data_ary['data']) < $package_size) ? count($data_ary['data']) : $package_size;
|
$num_items = (count($data_ary['data']) < $package_size) ? count($data_ary['data']) : $package_size;
|
||||||
|
|
||||||
switch ($object)
|
switch ($object)
|
||||||
|
@ -436,18 +437,16 @@ class queue
|
||||||
if (!$config['email_enable'])
|
if (!$config['email_enable'])
|
||||||
{
|
{
|
||||||
unset($this->queue_data['email']);
|
unset($this->queue_data['email']);
|
||||||
break 2;
|
continue;
|
||||||
}
|
}
|
||||||
@set_time_limit(60);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'jabber':
|
case 'jabber':
|
||||||
if (!$config['jab_enable'])
|
if (!$config['jab_enable'])
|
||||||
{
|
{
|
||||||
unset($this->queue_data['jabber']);
|
unset($this->queue_data['jabber']);
|
||||||
break 2;
|
continue;
|
||||||
}
|
}
|
||||||
@set_time_limit(60);
|
|
||||||
|
|
||||||
include_once($phpbb_root_path . 'includes/functions_jabber.'.$phpEx);
|
include_once($phpbb_root_path . 'includes/functions_jabber.'.$phpEx);
|
||||||
$this->jabber = new Jabber;
|
$this->jabber = new Jabber;
|
||||||
|
@ -461,13 +460,13 @@ class queue
|
||||||
if (!$this->jabber->Connect())
|
if (!$this->jabber->Connect())
|
||||||
{
|
{
|
||||||
messenger::error('JABBER', 'Could not connect to Jabber server');
|
messenger::error('JABBER', 'Could not connect to Jabber server');
|
||||||
trigger_error('Could not connect to Jabber server', E_USER_ERROR);
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->jabber->SendAuth())
|
if (!$this->jabber->SendAuth())
|
||||||
{
|
{
|
||||||
messenger::error('JABBER', 'Could not authorise on Jabber server');
|
messenger::error('JABBER', 'Could not authorise on Jabber server');
|
||||||
trigger_error('Could not authorise on Jabber server', E_USER_ERROR);
|
continue;
|
||||||
}
|
}
|
||||||
$this->jabber->SendPresence(NULL, NULL, 'online');
|
$this->jabber->SendPresence(NULL, NULL, 'online');
|
||||||
break;
|
break;
|
||||||
|
@ -495,7 +494,7 @@ class queue
|
||||||
// Logging instead of displaying!?
|
// Logging instead of displaying!?
|
||||||
$message = 'Method: [ ' . (($config['smtp_delivery']) ? 'SMTP' : 'PHP') . ' ]<br /><br />' . $err_msg . '<br /><br /><u>CALLING PAGE</u><br /><br />' . ((!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : $_ENV['PHP_SELF']);
|
$message = 'Method: [ ' . (($config['smtp_delivery']) ? 'SMTP' : 'PHP') . ' ]<br /><br />' . $err_msg . '<br /><br /><u>CALLING PAGE</u><br /><br />' . ((!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : $_ENV['PHP_SELF']);
|
||||||
messenger::error('MAIL', $message);
|
messenger::error('MAIL', $message);
|
||||||
// trigger_error($message, E_USER_ERROR);
|
continue 2;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue