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/includes/functions_display.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/includes/functions_display.php')
-rw-r--r-- | phpBB/includes/functions_display.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 881c95907b..e9c7143473 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -59,7 +59,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod if (check_link_hash(request_var('hash', ''), 'global')) { - markread('all'); + markread('all', false, false, request_var('mark_time', 0)); trigger_error( $user->lang['FORUMS_MARKED'] . '<br /><br />' . @@ -309,7 +309,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod $token = request_var('hash', ''); if (check_link_hash($token, 'global')) { - markread('topics', $forum_ids); + markread('topics', $forum_ids, false, request_var('mark_time', 0)); $message = sprintf($user->lang['RETURN_FORUM'], '<a href="' . $redirect . '">', '</a>'); meta_refresh(3, $redirect); @@ -551,7 +551,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod } $template->assign_vars(array( - 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . '&f=' . $root_data['forum_id'] . '&mark=forums') : '', + 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . '&f=' . $root_data['forum_id'] . '&mark=forums&mark_time=' . time()) : '', 'S_HAS_SUBFORUM' => ($visible_forums) ? true : false, 'L_SUBFORUM' => ($visible_forums == 1) ? $user->lang['SUBFORUM'] : $user->lang['SUBFORUMS'], 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'), |