mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge pull request #3817 from Nicofuma/ticket/14076
[ticket/14076] Fix notification settings
This commit is contained in:
commit
ec270713d0
1 changed files with 5 additions and 5 deletions
|
@ -589,6 +589,7 @@ class manager
|
||||||
$user_id = $user_id ?: $this->user->data['user_id'];
|
$user_id = $user_id ?: $this->user->data['user_id'];
|
||||||
|
|
||||||
$subscriptions = array();
|
$subscriptions = array();
|
||||||
|
$default_methods = $this->get_default_methods();
|
||||||
|
|
||||||
$user_notifications = $this->get_user_notifications($user_id);
|
$user_notifications = $this->get_user_notifications($user_id);
|
||||||
|
|
||||||
|
@ -596,11 +597,8 @@ class manager
|
||||||
{
|
{
|
||||||
foreach ($types as $id => $type)
|
foreach ($types as $id => $type)
|
||||||
{
|
{
|
||||||
if (empty($user_notifications[$id]))
|
$subscriptions[$id] = array();
|
||||||
{
|
if (!empty($user_notifications[$id]))
|
||||||
$subscriptions[$id] = $this->get_default_methods();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
foreach ($user_notifications[$id] as $user_notification)
|
foreach ($user_notifications[$id] as $user_notification)
|
||||||
{
|
{
|
||||||
|
@ -617,6 +615,8 @@ class manager
|
||||||
$subscriptions[$id][] = $user_notification['method'];
|
$subscriptions[$id][] = $user_notification['method'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$subscriptions[$id] = array_merge($subscriptions[$id], $default_methods);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue