1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/12990] Use the full services name for the notification's types

PHPBB3-12990
This commit is contained in:
Tristan Darricau
2014-08-16 21:06:10 +02:00
parent e9f5b9d657
commit fe80967535
35 changed files with 231 additions and 118 deletions

View File

@@ -58,28 +58,28 @@ class ucp_notifications
{
foreach($notification_methods as $method => $method_data)
{
if ($request->is_set_post($type . '_' . $method_data['id']) && (!isset($subscriptions[$type]) || !in_array($method_data['id'], $subscriptions[$type])))
if ($request->is_set_post(str_replace('.', '_', $type . '_' . $method_data['id'])) && (!isset($subscriptions[$type]) || !in_array($method_data['id'], $subscriptions[$type])))
{
$phpbb_notifications->add_subscription($type, 0, $method_data['id']);
}
else if (!$request->is_set_post($type . '_' . $method_data['id']) && isset($subscriptions[$type]) && in_array($method_data['id'], $subscriptions[$type]))
else if (!$request->is_set_post(str_replace('.', '_', $type . '_' . $method_data['id'])) && isset($subscriptions[$type]) && in_array($method_data['id'], $subscriptions[$type]))
{
$phpbb_notifications->delete_subscription($type, 0, $method_data['id']);
}
}
if ($request->is_set_post($type . '_notification') && !isset($subscriptions[$type]))
if ($request->is_set_post(str_replace('.', '_', $type) . '_notification') && !isset($subscriptions[$type]))
{
$phpbb_notifications->add_subscription($type);
}
else if (!$request->is_set_post($type . '_notification') && isset($subscriptions[$type]))
else if (!$request->is_set_post(str_replace('.', '_', $type) . '_notification') && isset($subscriptions[$type]))
{
$phpbb_notifications->delete_subscription($type);
}
}
}
meta_refresh(3, $this->u_action);
//meta_refresh(3, $this->u_action);
$message = $user->lang['PREFERENCES_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
trigger_error($message);
}