aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2012-03-10 00:17:39 +0800
committerrxu <rxu@mail.ru>2012-03-10 00:17:39 +0800
commit89a6cb2886dfd4659e6db67e27e42c4df763f723 (patch)
tree1c5e83d2b967a015d61b5bf189540d378f7dcbbb
parent[ticket/10684] Remove isset() for $sql_ignore_users update (diff)
downloadphpbb-89a6cb2886dfd4659e6db67e27e42c4df763f723.tar.gz
phpbb-89a6cb2886dfd4659e6db67e27e42c4df763f723.tar.bz2
phpbb-89a6cb2886dfd4659e6db67e27e42c4df763f723.zip
[ticket/10684] Refactor $sql_ignore_users array update
PHPBB3-10684
-rw-r--r--phpBB/includes/functions_posting.php13
1 files changed, 3 insertions, 10 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index c9b4267c35..af26d8ed0f 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1214,21 +1214,15 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
'method' => $row['user_notify_type'],
'allowed' => false
);
+
+ // Add users who have been already notified to ignore list
+ $sql_ignore_users[$row['user_id']] = $row['user_id'];
}
$db->sql_freeresult($result);
// forum notification is sent to those not already receiving topic notifications
if ($topic_notification)
{
- // Add users who have been already notified to ignore list
- if (sizeof($notify_rows))
- {
- foreach ($notify_rows as $user_id => $row)
- {
- $sql_ignore_users[$user_id] = $user_id;
- }
- }
-
$sql = 'SELECT u.user_id, u.username, u.user_email, u.user_lang, u.user_notify_type, u.user_jabber
FROM ' . FORUMS_WATCH_TABLE . ' fw, ' . USERS_TABLE . " u
WHERE fw.forum_id = $forum_id
@@ -1272,7 +1266,6 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
}
}
-
// Now, we have to do a little step before really sending, we need to distinguish our users a little bit. ;)
$msg_users = $delete_ids = $update_notification = array();
foreach ($notify_rows as $user_id => $row)