From ec47f0830b1f92b80141751acd4048276e22d957 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 3 Oct 2024 18:48:47 -0700 Subject: [PATCH] web: forums: fix 'mark all threads as read' function --- html/user/forum_index.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/html/user/forum_index.php b/html/user/forum_index.php index b3b0c5fe83..08dc5ebc0c 100644 --- a/html/user/forum_index.php +++ b/html/user/forum_index.php @@ -23,17 +23,6 @@ require_once('../inc/forum.inc'); require_once('../inc/pm.inc'); require_once('../inc/time.inc'); -// Process request to mark all posts as read -// -if ((get_int("read", true) == 1)) { - if ($user) { - check_tokens($user->authenticator); - $now = time(); - $user->prefs->update("mark_as_read_timestamp=$now"); - Header("Location: ".get_str("return", true)); - } -} - function show_forum_summary($forum) { switch ($forum->parent_type) { case 0: @@ -204,6 +193,17 @@ if (DISABLE_FORUMS && !is_admin($user)) { error_page("Forums are disabled"); } +// Process request to mark all posts as read +// +if ((get_int("read", true) == 1)) { + if ($user) { + check_tokens($user->authenticator); + $now = time(); + $user->prefs->update("mark_as_read_timestamp=$now"); + Header("Location: ".get_str("return", true)); + } +} + $submit = post_str('submit', true); if ($submit) { do_unsubscribe($user);