aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_notifications.php
diff options
context:
space:
mode:
authorCesar G <prototech91@gmail.com>2013-11-23 20:11:49 -0800
committerCesar G <prototech91@gmail.com>2013-12-30 11:12:15 -0800
commitf4b832a27d128ec84142dfe6133dc6ba96b8d3a9 (patch)
tree02716fb3c67019d8f4749faa7ce554334cff9fa5 /phpBB/includes/ucp/ucp_notifications.php
parentbe67124dc7d5461c9b085e4dc3f32ece87e4b1aa (diff)
downloadforums-f4b832a27d128ec84142dfe6133dc6ba96b8d3a9.tar
forums-f4b832a27d128ec84142dfe6133dc6ba96b8d3a9.tar.gz
forums-f4b832a27d128ec84142dfe6133dc6ba96b8d3a9.tar.bz2
forums-f4b832a27d128ec84142dfe6133dc6ba96b8d3a9.tar.xz
forums-f4b832a27d128ec84142dfe6133dc6ba96b8d3a9.zip
[ticket/12034] AJAXify notifications popup.
PHPBB3-12034
Diffstat (limited to 'phpBB/includes/ucp/ucp_notifications.php')
-rw-r--r--phpBB/includes/ucp/ucp_notifications.php14
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