aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_notifications.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/ucp/ucp_notifications.php')
-rw-r--r--phpBB/includes/ucp/ucp_notifications.php19
1 files changed, 4 insertions, 15 deletions
diff --git a/phpBB/includes/ucp/ucp_notifications.php b/phpBB/includes/ucp/ucp_notifications.php
index 6d0d4f06a6..8e9fe2dfc1 100644
--- a/phpBB/includes/ucp/ucp_notifications.php
+++ b/phpBB/includes/ucp/ucp_notifications.php
@@ -70,15 +70,6 @@ class ucp_notifications
$phpbb_notifications->delete_subscription($type, 0, $method_data['id']);
}
}
-
- if ($request->is_set_post(str_replace('.', '_', $type) . '_notification') && !isset($subscriptions[$type]))
- {
- $phpbb_notifications->add_subscription($type);
- }
- else if (!$request->is_set_post(str_replace('.', '_', $type) . '_notification') && isset($subscriptions[$type]))
- {
- $phpbb_notifications->delete_subscription($type);
- }
}
}
@@ -100,7 +91,7 @@ class ucp_notifications
// Mark all items read
if ($request->variable('mark', '') == 'all' && check_link_hash($request->variable('token', ''), 'mark_all_notifications_read'))
{
- $phpbb_notifications->mark_notifications_read(false, false, $user->data['user_id'], $form_time);
+ $phpbb_notifications->mark_notifications(false, false, $user->data['user_id'], $form_time);
meta_refresh(3, $this->u_action);
$message = $user->lang['NOTIFICATIONS_MARK_ALL_READ_SUCCESS'];
@@ -131,11 +122,11 @@ class ucp_notifications
if (!empty($mark_read))
{
- $phpbb_notifications->mark_notifications_read_by_id($mark_read, $form_time);
+ $phpbb_notifications->mark_notifications_by_id($mark_read, $form_time);
}
}
- $notifications = $phpbb_notifications->load_notifications(array(
+ $notifications = $phpbb_notifications->load_notifications('notification.method.board', array(
'start' => $start,
'limit' => $config['topics_per_page'],
'count_total' => true,
@@ -196,8 +187,6 @@ class ucp_notifications
'NAME' => $user->lang($data['lang']),
'EXPLAIN' => (isset($user->lang[$data['lang'] . '_EXPLAIN'])) ? $user->lang($data['lang'] . '_EXPLAIN') : '',
-
- 'SUBSCRIBED' => (isset($subscriptions[$type])) ? true : false,
));
foreach ($notification_methods as $method => $method_data)
@@ -230,7 +219,7 @@ class ucp_notifications
{
$notification_methods = $phpbb_notifications->get_subscription_methods();
- foreach ($notification_methods as $method => $method_data)
+ foreach($notification_methods as $method => $method_data)
{
$template->assign_block_vars($block, array(
'METHOD' => $method_data['id'],