aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/index.php')
-rw-r--r--phpBB/index.php24
1 files changed, 23 insertions, 1 deletions
diff --git a/phpBB/index.php b/phpBB/index.php
index 66e1b2114b..ac886be0ff 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -23,6 +23,28 @@ $user->session_begin();
$auth->acl($user->data);
$user->setup();
+// Mark notifications read
+if (($mark_notification = request_var('mark_notification', 0)))
+{
+ $notification = $phpbb_notifications->load_notifications(array(
+ 'notification_id' => $mark_notification
+ ));
+
+ if (isset($notification['notifications'][$mark_notification]))
+ {
+ $notification = $notification['notifications'][$mark_notification];
+
+ $notification->mark_read();
+
+ if (($redirect = request_var('redirect', '')))
+ {
+ redirect(append_sid($phpbb_root_path . $redirect));
+ }
+
+ redirect($notification->get_url());
+ }
+}
+
// Handle the display of extension front pages
if ($ext = $request->variable('ext', ''))
{
@@ -31,7 +53,7 @@ if ($ext = $request->variable('ext', ''))
if (!$phpbb_extension_manager->available($ext))
{
send_status_line(404, 'Not Found');
- trigger_error($user->lang('EXTENSION_DOES_NOT_EXIST', $ext));
+ trigger_error($user->lang('EXTENSION_DOES_NOT_EXIST', $ext));
}
else if (!$phpbb_extension_manager->enabled($ext))
{