diff options
author | Nathaniel Guse <nathaniel.guse@gmail.com> | 2012-09-03 18:51:29 -0500 |
---|---|---|
committer | Nathaniel Guse <nathaniel.guse@gmail.com> | 2012-09-03 18:51:29 -0500 |
commit | 9cba0b5263a8dcf0ff4cbfd6db2b37cd0cce55f1 (patch) | |
tree | f76204892a0c2cfe415939089a4bf02790a5f7d1 /phpBB/viewforum.php | |
parent | b9308329cf3c0e6844a35f2d274423c2640887db (diff) | |
download | forums-9cba0b5263a8dcf0ff4cbfd6db2b37cd0cce55f1.tar forums-9cba0b5263a8dcf0ff4cbfd6db2b37cd0cce55f1.tar.gz forums-9cba0b5263a8dcf0ff4cbfd6db2b37cd0cce55f1.tar.bz2 forums-9cba0b5263a8dcf0ff4cbfd6db2b37cd0cce55f1.tar.xz forums-9cba0b5263a8dcf0ff4cbfd6db2b37cd0cce55f1.zip |
[ticket/8796] Mark read links updated to include time() in url
Submitting the current time() allows us to mark only the topics
and forums read up until a certain time (when the user loaded
the page). This means that any new posts or topics posted between
when the user opened the page and clicked the link are still
shown as unread.
PHPBB3-8796
Diffstat (limited to 'phpBB/viewforum.php')
-rw-r--r-- | phpBB/viewforum.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 03c2bb286f..83e5d4caa5 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -176,7 +176,7 @@ if ($mark_read == 'topics') $token = request_var('hash', ''); if (check_link_hash($token, 'global')) { - markread('topics', array($forum_id)); + markread('topics', array($forum_id), false, request_var('mark_time', 0)); } $redirect_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id); meta_refresh(3, $redirect_url); @@ -340,7 +340,7 @@ $template->assign_vars(array( 'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&i=main&mode=forum_view", true, $user->session_id) : '', 'U_POST_NEW_TOPIC' => ($auth->acl_get('f_post', $forum_id) || $user->data['user_id'] == ANONYMOUS) ? append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=post&f=' . $forum_id) : '', 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . (($start == 0) ? '' : "&start=$start")), - 'U_MARK_TOPICS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . "&f=$forum_id&mark=topics") : '', + 'U_MARK_TOPICS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . "&f=$forum_id&mark=topics&mark_time=" . time()) : '', )); // Grab icons |