aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/notifications
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2012-09-27 19:19:38 -0500
committerNathan Guse <nathaniel.guse@gmail.com>2012-09-27 19:19:38 -0500
commitba7289b9d273df4f3dfb228ab37d324ff17cc9db (patch)
tree04fac5d62160fed9023bfd306b153c34774419af /phpBB/includes/notifications
parent521992215cfaac6ae22421325fbcfb0c3fefecb7 (diff)
downloadforums-ba7289b9d273df4f3dfb228ab37d324ff17cc9db.tar
forums-ba7289b9d273df4f3dfb228ab37d324ff17cc9db.tar.gz
forums-ba7289b9d273df4f3dfb228ab37d324ff17cc9db.tar.bz2
forums-ba7289b9d273df4f3dfb228ab37d324ff17cc9db.tar.xz
forums-ba7289b9d273df4f3dfb228ab37d324ff17cc9db.zip
[ticket/11103] Use PM Notification Preferences from Notification Options
Remove all PM Notification preferences from UCP Board Preferences PHPBB3-11103
Diffstat (limited to 'phpBB/includes/notifications')
-rw-r--r--phpBB/includes/notifications/type/pm.php26
1 files changed, 11 insertions, 15 deletions
diff --git a/phpBB/includes/notifications/type/pm.php b/phpBB/includes/notifications/type/pm.php
index df7b42564c..75c79e35e6 100644
--- a/phpBB/includes/notifications/type/pm.php
+++ b/phpBB/includes/notifications/type/pm.php
@@ -85,25 +85,21 @@ class phpbb_notifications_type_pm extends phpbb_notifications_type_base
$notify_users = array();
- foreach (array_keys($pm['recipients']) as $user_id)
+ $sql = 'SELECT *
+ FROM ' . USER_NOTIFICATIONS_TABLE . "
+ WHERE item_type = '" . self::get_item_type() . "'
+ AND " . $db->sql_in_set('user_id', array_keys($pm['recipients']));
+ $result = $db->sql_query($sql);
+ while ($row = $db->sql_fetchrow($result))
{
- $recipient = $service->get_user($user_id);
-
- if ($recipient['user_notify_pm'])
+ if (!isset($rowset[$row['user_id']]))
{
- $notify_users[$recipient['user_id']] = array();
-
- if ($recipient['user_notify_type'] == NOTIFY_EMAIL || $recipient['user_notify_type'] == NOTIFY_BOTH)
- {
- $notify_users[$recipient['user_id']][] = 'email';
- }
-
- if ($recipient['user_notify_type'] == NOTIFY_IM || $recipient['user_notify_type'] == NOTIFY_BOTH)
- {
- $notify_users[$recipient['user_id']][] = 'jabber';
- }
+ $notify_users[$row['user_id']] = array();
}
+
+ $notify_users[$row['user_id']][] = $row['method'];
}
+ $db->sql_freeresult($result);
return $notify_users;
}