aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/index.php')
-rw-r--r--phpBB/index.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/phpBB/index.php b/phpBB/index.php
index 845d0f0c02..94b2b17084 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -24,6 +24,28 @@ $user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');
+// 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());
+ }
+}
+
display_forums('', $config['load_moderators']);
$order_legend = ($config['legend_sort_groupname']) ? 'group_name' : 'group_legend';