1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-10 18:54:08 +02:00

[ticket/12034] AJAXify notifications popup.

PHPBB3-12034
This commit is contained in:
Cesar G
2013-11-23 20:11:49 -08:00
parent be67124dc7
commit f4b832a27d
11 changed files with 141 additions and 24 deletions

View File

@@ -98,7 +98,19 @@ class ucp_notifications
$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'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
$message = $user->lang['NOTIFICATIONS_MARK_ALL_READ_SUCCESS'];
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>');
trigger_error($message);
}
else