mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Mass Email works again for users with empty jabber address but notification set to 'both'. (Bug #39755)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9389 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
308ded3f55
commit
1e36ed1f74
5 changed files with 35 additions and 10 deletions
|
@ -124,6 +124,7 @@
|
|||
<li>[Fix] Do not suppress PHP notices/errors in language packs if DEBUG_EXTRA mode enabled. (Bug #41485)</li>
|
||||
<li>[Fix] Flash files do not display anymore after update to flash player 10 (Bug #41315)</li>
|
||||
<li>[Fix] Use FQDN for SMTP EHLO/HELO command. (Bug #41025)</li>
|
||||
<li>[Fix] Mass Email works again for users with empty jabber address but notification set to 'both'. (Bug #39755)</li>
|
||||
<li>[Change] Allow download of conflicting file for later reference in automatic updater</li>
|
||||
<li>[Change] Default difference view is now 'inline' instead of 'side by side'</li>
|
||||
<li>[Change] Added new option for merging differences to conflicting files in automatic updater</li>
|
||||
|
|
|
@ -121,7 +121,7 @@ class acp_email
|
|||
{
|
||||
if (($row['user_notify_type'] == NOTIFY_EMAIL && $row['user_email']) ||
|
||||
($row['user_notify_type'] == NOTIFY_IM && $row['user_jabber']) ||
|
||||
($row['user_notify_type'] == NOTIFY_BOTH && $row['user_email'] && $row['user_jabber']))
|
||||
($row['user_notify_type'] == NOTIFY_BOTH && ($row['user_email'] || $row['user_jabber'])))
|
||||
{
|
||||
if ($i == $max_chunk_size || $row['user_lang'] != $old_lang || $row['user_notify_type'] != $old_notify_type)
|
||||
{
|
||||
|
|
|
@ -88,7 +88,8 @@ class acp_jabber
|
|||
else
|
||||
{
|
||||
// This feature is disabled.
|
||||
// We update the user table to be sure all users that have IM as notify type are set to both as notify type
|
||||
// We update the user table to be sure all users that have IM as notify type are set to both as notify type
|
||||
// We set this to both because users still have their jabber address entered and may want to receive jabber notifications again once it is re-enabled.
|
||||
$sql_ary = array(
|
||||
'user_notify_type' => NOTIFY_BOTH,
|
||||
);
|
||||
|
|
|
@ -61,6 +61,11 @@ class messenger
|
|||
{
|
||||
global $config;
|
||||
|
||||
if (!trim($address))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$pos = isset($this->addresses['to']) ? sizeof($this->addresses['to']) : 0;
|
||||
|
||||
$this->addresses['to'][$pos]['email'] = trim($address);
|
||||
|
@ -81,6 +86,11 @@ class messenger
|
|||
*/
|
||||
function cc($address, $realname = '')
|
||||
{
|
||||
if (!trim($address))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$pos = isset($this->addresses['cc']) ? sizeof($this->addresses['cc']) : 0;
|
||||
$this->addresses['cc'][$pos]['email'] = trim($address);
|
||||
$this->addresses['cc'][$pos]['name'] = trim($realname);
|
||||
|
@ -91,6 +101,11 @@ class messenger
|
|||
*/
|
||||
function bcc($address, $realname = '')
|
||||
{
|
||||
if (!trim($address))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$pos = isset($this->addresses['bcc']) ? sizeof($this->addresses['bcc']) : 0;
|
||||
$this->addresses['bcc'][$pos]['email'] = trim($address);
|
||||
$this->addresses['bcc'][$pos]['name'] = trim($realname);
|
||||
|
@ -102,7 +117,7 @@ class messenger
|
|||
function im($address, $realname = '')
|
||||
{
|
||||
// IM-Addresses could be empty
|
||||
if (!$address)
|
||||
if (!trim($address))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -363,6 +378,13 @@ class messenger
|
|||
return false;
|
||||
}
|
||||
|
||||
// Addresses to send to?
|
||||
if (empty($this->addresses) || (empty($this->addresses['to']) && empty($this->addresses['cc']) && empty($this->addresses['bcc'])))
|
||||
{
|
||||
// Send was successful. ;)
|
||||
return true;
|
||||
}
|
||||
|
||||
$use_queue = false;
|
||||
if ($config['email_package_size'] && $this->use_queue)
|
||||
{
|
||||
|
@ -457,7 +479,8 @@ class messenger
|
|||
|
||||
if (empty($this->addresses['im']))
|
||||
{
|
||||
return false;
|
||||
// Send was successful. ;)
|
||||
return true;
|
||||
}
|
||||
|
||||
$use_queue = false;
|
||||
|
|
|
@ -349,11 +349,11 @@ class ucp_profile
|
|||
{
|
||||
$data['notify'] = $user->data['user_notify_type'];
|
||||
|
||||
if (!$config['jab_enable'] || !$data['jabber'] || !@extension_loaded('xml'))
|
||||
if ($data['notify'] == NOTIFY_IM && (!$config['jab_enable'] || !$data['jabber'] || !@extension_loaded('xml')))
|
||||
{
|
||||
// User has not filled in a jabber address (Or one of the modules is disabled or jabber is disabled)
|
||||
// Disable notify by Jabber now for this user.
|
||||
$data['notify'] = NOTIFY_BOTH;
|
||||
$data['notify'] = NOTIFY_EMAIL;
|
||||
}
|
||||
|
||||
$sql_ary = array(
|
||||
|
|
Loading…
Add table
Reference in a new issue