1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-21 18:44:37 +02: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:
Meik Sievertsen
2009-03-17 15:50:19 +00:00
parent 308ded3f55
commit 1e36ed1f74
5 changed files with 35 additions and 10 deletions

View File

@ -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>

View File

@ -108,7 +108,7 @@ class acp_email
$db->sql_freeresult($result);
trigger_error($user->lang['NO_USER'] . adm_back_link($this->u_action), E_USER_WARNING);
}
$i = $j = 0;
// Send with BCC, no more than 50 recipients for one mail (to not exceed the limit)
@ -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)
{
@ -173,7 +173,7 @@ class acp_email
$messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
$messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
$messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
$messenger->subject(htmlspecialchars_decode($subject));
$messenger->set_mail_priority($priority);
@ -181,7 +181,7 @@ class acp_email
'CONTACT_EMAIL' => $config['board_contact'],
'MESSAGE' => htmlspecialchars_decode($message))
);
if (!($messenger->send($used_method)))
{
$errored = true;
@ -239,7 +239,7 @@ class acp_email
$select_list = '<option value="0"' . ((!$group_id) ? ' selected="selected"' : '') . '>' . $user->lang['ALL_USERS'] . '</option>';
$select_list .= group_select_options($group_id, $exclude);
$s_priority_options = '<option value="' . MAIL_LOW_PRIORITY . '">' . $user->lang['MAIL_LOW_PRIORITY'] . '</option>';
$s_priority_options .= '<option value="' . MAIL_NORMAL_PRIORITY . '" selected="selected">' . $user->lang['MAIL_NORMAL_PRIORITY'] . '</option>';
$s_priority_options .= '<option value="' . MAIL_HIGH_PRIORITY . '">' . $user->lang['MAIL_HIGH_PRIORITY'] . '</option>';

View File

@ -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,
);

View File

@ -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;

View File

@ -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(