diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2013-12-30 12:20:22 -0800 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2013-12-30 12:20:22 -0800 |
commit | 821f737560330827ded1fd5eabead6ac23087e24 (patch) | |
tree | 9c5247e2a0e93d15ef5fcf2a95b36cc6441897df /phpBB/includes/ucp/ucp_notifications.php | |
parent | b186d31ce6b0502898e93cfa5e69e2d0da0758d0 (diff) | |
parent | d76ec60ee15c1fafbb4212eda77b842e793108d0 (diff) | |
download | forums-821f737560330827ded1fd5eabead6ac23087e24.tar forums-821f737560330827ded1fd5eabead6ac23087e24.tar.gz forums-821f737560330827ded1fd5eabead6ac23087e24.tar.bz2 forums-821f737560330827ded1fd5eabead6ac23087e24.tar.xz forums-821f737560330827ded1fd5eabead6ac23087e24.zip |
Merge pull request #1890 from prototech/ticket/12034
[ticket/12034] AJAXify notifications popup.
Diffstat (limited to 'phpBB/includes/ucp/ucp_notifications.php')
-rw-r--r-- | phpBB/includes/ucp/ucp_notifications.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/phpBB/includes/ucp/ucp_notifications.php b/phpBB/includes/ucp/ucp_notifications.php index 79055095bc..c5963a1ebc 100644 --- a/phpBB/includes/ucp/ucp_notifications.php +++ b/phpBB/includes/ucp/ucp_notifications.php @@ -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 |