aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/notification
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2015-08-07 16:38:12 +0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2015-08-07 16:38:53 +0200
commit7e62b3a4b0b86b23c594d6b3644439a9c7f63153 (patch)
tree5ec62f533ac631349ccd8fa4a9ddd8e531504264 /phpBB/phpbb/notification
parente4e3f595ec02d798e06e4be01efd92764760afd8 (diff)
downloadforums-7e62b3a4b0b86b23c594d6b3644439a9c7f63153.tar
forums-7e62b3a4b0b86b23c594d6b3644439a9c7f63153.tar.gz
forums-7e62b3a4b0b86b23c594d6b3644439a9c7f63153.tar.bz2
forums-7e62b3a4b0b86b23c594d6b3644439a9c7f63153.tar.xz
forums-7e62b3a4b0b86b23c594d6b3644439a9c7f63153.zip
[ticket/14076] Fix notification settings
PHPBB3-14076
Diffstat (limited to 'phpBB/phpbb/notification')
-rw-r--r--phpBB/phpbb/notification/manager.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/phpbb/notification/manager.php b/phpBB/phpbb/notification/manager.php
index 04259382ba..eb9a93be3d 100644
--- a/phpBB/phpbb/notification/manager.php
+++ b/phpBB/phpbb/notification/manager.php
@@ -589,6 +589,7 @@ class manager
$user_id = $user_id ?: $this->user->data['user_id'];
$subscriptions = array();
+ $default_methods = $this->get_default_methods();
$user_notifications = $this->get_user_notifications($user_id);
@@ -596,11 +597,8 @@ class manager
{
foreach ($types as $id => $type)
{
- if (empty($user_notifications[$id]))
- {
- $subscriptions[$id] = $this->get_default_methods();
- }
- else
+ $subscriptions[$id] = array();
+ if (!empty($user_notifications[$id]))
{
foreach ($user_notifications[$id] as $user_notification)
{
@@ -617,6 +615,8 @@ class manager
$subscriptions[$id][] = $user_notification['method'];
}
}
+
+ $subscriptions[$id] = array_merge($subscriptions[$id], $default_methods);
}
}