aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2014-10-21 09:49:16 -0400
committerNils Adermann <naderman@naderman.de>2014-10-21 09:49:16 -0400
commit1358acfd7c2b5d0a302b4192f1f536456dcf3671 (patch)
tree2a8389e8be34ca4fee7335227ab8f95dbec1ce44 /phpBB
parent99eeb52b763fb2efb2e5dad2b39c06b2be8c74b5 (diff)
parent293d64e12268e2829918fc0bc7cfbc06bb4de9f2 (diff)
downloadforums-1358acfd7c2b5d0a302b4192f1f536456dcf3671.tar
forums-1358acfd7c2b5d0a302b4192f1f536456dcf3671.tar.gz
forums-1358acfd7c2b5d0a302b4192f1f536456dcf3671.tar.bz2
forums-1358acfd7c2b5d0a302b4192f1f536456dcf3671.tar.xz
forums-1358acfd7c2b5d0a302b4192f1f536456dcf3671.zip
Merge pull request #3049 from marc1706/ticket/13189
[ticket/13189] Do not use confirm box for marking all notifications read
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/ucp/ucp_notifications.php38
1 files changed, 14 insertions, 24 deletions
diff --git a/phpBB/includes/ucp/ucp_notifications.php b/phpBB/includes/ucp/ucp_notifications.php
index 5691302b83..b0aeaba227 100644
--- a/phpBB/includes/ucp/ucp_notifications.php
+++ b/phpBB/includes/ucp/ucp_notifications.php
@@ -95,35 +95,25 @@ class ucp_notifications
case 'notification_list':
default:
// Mark all items read
- if ($request->variable('mark', '') == 'all' && (confirm_box(true) || check_link_hash($request->variable('token', ''), 'mark_all_notifications_read')))
+ if ($request->variable('mark', '') == 'all' && check_link_hash($request->variable('token', ''), 'mark_all_notifications_read'))
{
- if (confirm_box(true))
- {
- $phpbb_notifications->mark_notifications_read(false, false, $user->data['user_id'], $form_time);
-
- meta_refresh(3, $this->u_action);
- $message = $user->lang['NOTIFICATIONS_MARK_ALL_READ_SUCCESS'];
+ $phpbb_notifications->mark_notifications_read(false, false, $user->data['user_id'], $form_time);
- if ($request->is_ajax())
- {
- $json_response = new \phpbb\json_response();
- $json_response->send(array(
- 'MESSAGE_TITLE' => $user->lang['INFORMATION'],
- 'MESSAGE_TEXT' => $message,
- 'success' => true,
- ));
- }
- $message .= '<br /><br />' . $user->lang('RETURN_UCP', '<a href="' . $this->u_action . '">', '</a>');
+ meta_refresh(3, $this->u_action);
+ $message = $user->lang['NOTIFICATIONS_MARK_ALL_READ_SUCCESS'];
- trigger_error($message);
- }
- else
+ if ($request->is_ajax())
{
- confirm_box(false, 'NOTIFICATIONS_MARK_ALL_READ', build_hidden_fields(array(
- 'mark' => 'all',
- 'form_time' => $form_time,
- )));
+ $json_response = new \phpbb\json_response();
+ $json_response->send(array(
+ 'MESSAGE_TITLE' => $user->lang['INFORMATION'],
+ 'MESSAGE_TEXT' => $message,
+ 'success' => true,
+ ));
}
+ $message .= '<br /><br />' . $user->lang('RETURN_UCP', '<a href="' . $this->u_action . '">', '</a>');
+
+ trigger_error($message);
}
// Mark specific notifications read