diff options
author | Vjacheslav Trushkin <arty@phpbb.com> | 2012-03-24 11:45:53 +0200 |
---|---|---|
committer | Vjacheslav Trushkin <arty@phpbb.com> | 2012-03-24 11:45:53 +0200 |
commit | 583da4274f91d3e8228ce58e8a849aa861ef66f8 (patch) | |
tree | d1841433f1d54768c3fc9f01af138adff6fc50c9 /phpBB/includes/functions_privmsgs.php | |
parent | f17449e5ffb87c4a63e6c27c52036c5812f970d7 (diff) | |
parent | cc13bac412442a1d72affcc3222b6bfca094e92a (diff) | |
download | forums-583da4274f91d3e8228ce58e8a849aa861ef66f8.tar forums-583da4274f91d3e8228ce58e8a849aa861ef66f8.tar.gz forums-583da4274f91d3e8228ce58e8a849aa861ef66f8.tar.bz2 forums-583da4274f91d3e8228ce58e8a849aa861ef66f8.tar.xz forums-583da4274f91d3e8228ce58e8a849aa861ef66f8.zip |
Merge branch 'develop' into feature/prosilver-cleanup/duplicate-colors
* develop: (117 commits)
[task/travis] Refactor php version check for dbunit install
[task/travis] Exclude functional and slow tests
[ticket/10719] Revert "Skip functional tests on PHP 5.2"
[task/travis-develop2] Update version from 5.3 to 5.3.2
[task/travis] Dropping support for 5.2 in develop branch
[task/travis] Some more small travis fixes
[task/travis] Rename travis phpunit config files
[task/travis] Fixing some travis issues
[ticket/10684] Adjust function and parameter name, minor changes.
[task/travis] Add automated testing to readme
[task/travis] Removing development information
[task/travis] Adding Travis Continuous Intergration Support
[ticket/10704] minor typo in a comment
[ticket/10717] Fix profile field sample in prosilver“s memberlist_view.html
[ticket/10691] Fixed the speed of creating search index
[task/php54-ascraeus] Bring p_master#module_auth into PHP 5 era.
[task/php54] Disable E_STRICT in Olympus when running on PHP 5.4.
[task/php54] Refactor error_reporting call slightly.
[ticket/10690] Fix undefined UNAPPROVED_POSTS_ZERO_TOTAL in queue
[ticket/10689] Fix "First character"-option in "Find a member"-search
...
Conflicts:
phpBB/styles/prosilver/theme/cp.css
Diffstat (limited to 'phpBB/includes/functions_privmsgs.php')
-rw-r--r-- | phpBB/includes/functions_privmsgs.php | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 91e453b8e0..a6fb87536a 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1666,6 +1666,7 @@ function pm_notification($mode, $author, $recipients, $subject, $message, $msg_i $subject = censor_text($subject); + // Exclude guests, current user and banned users from notifications unset($recipients[ANONYMOUS], $recipients[$user->data['user_id']]); if (!sizeof($recipients)) @@ -1673,18 +1674,12 @@ function pm_notification($mode, $author, $recipients, $subject, $message, $msg_i return; } - // Get banned User ID's - $sql = 'SELECT ban_userid - FROM ' . BANLIST_TABLE . ' - WHERE ' . $db->sql_in_set('ban_userid', array_map('intval', array_keys($recipients))) . ' - AND ban_exclude = 0'; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) + if (!function_exists('phpbb_get_banned_user_ids')) { - unset($recipients[$row['ban_userid']]); + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); } - $db->sql_freeresult($result); + $banned_users = phpbb_get_banned_user_ids(array_keys($recipients)); + $recipients = array_diff(array_keys($recipients), $banned_users); if (!sizeof($recipients)) { @@ -1693,7 +1688,7 @@ function pm_notification($mode, $author, $recipients, $subject, $message, $msg_i $sql = 'SELECT user_id, username, user_email, user_lang, user_notify_pm, user_notify_type, user_jabber FROM ' . USERS_TABLE . ' - WHERE ' . $db->sql_in_set('user_id', array_map('intval', array_keys($recipients))); + WHERE ' . $db->sql_in_set('user_id', $recipients); $result = $db->sql_query($sql); $msg_list_ary = array(); |