diff --git a/html/user/forum_index.php b/html/user/forum_index.php index b3b0c5fe833..08dc5ebc0c2 100644 --- a/html/user/forum_index.php +++ b/html/user/forum_index.php @@ -23,17 +23,6 @@ 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 @@ function do_unsubscribe($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);