mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Merge pull request #3049 from marc1706/ticket/13189
[ticket/13189] Do not use confirm box for marking all notifications read
This commit is contained in:
commit
1358acfd7c
2 changed files with 16 additions and 28 deletions
|
@ -95,9 +95,7 @@ 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 (confirm_box(true))
|
||||
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);
|
||||
|
||||
|
@ -117,14 +115,6 @@ class ucp_notifications
|
|||
|
||||
trigger_error($message);
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, 'NOTIFICATIONS_MARK_ALL_READ', build_hidden_fields(array(
|
||||
'mark' => 'all',
|
||||
'form_time' => $form_time,
|
||||
)));
|
||||
}
|
||||
}
|
||||
|
||||
// Mark specific notifications read
|
||||
if ($request->is_set_post('submit'))
|
||||
|
|
|
@ -82,8 +82,6 @@ class phpbb_functional_notification_test extends phpbb_functional_test_case
|
|||
// Get form token
|
||||
$link = $crawler->selectLink($this->lang('NOTIFICATIONS_MARK_ALL_READ'))->link()->getUri();
|
||||
$crawler = self::request('GET', substr($link, strpos($link, 'ucp.')));
|
||||
$form = $crawler->selectButton($this->lang('YES'))->form();
|
||||
$crawler = self::submit($form);
|
||||
$this->assertEquals(0, $crawler->filter('#notification_list_button strong')->text());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue