aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-04-01 16:01:39 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-04-01 16:01:39 +0000
commit3fa29da47dc52ccc3138b9bf14013545be0e90c0 (patch)
treec50e2701ea0cc60a07b6f0d5381408fe1b827438
parent5828a9a85b07e82c88c40716f85e3561da4df690 (diff)
downloadforums-3fa29da47dc52ccc3138b9bf14013545be0e90c0.tar
forums-3fa29da47dc52ccc3138b9bf14013545be0e90c0.tar.gz
forums-3fa29da47dc52ccc3138b9bf14013545be0e90c0.tar.bz2
forums-3fa29da47dc52ccc3138b9bf14013545be0e90c0.tar.xz
forums-3fa29da47dc52ccc3138b9bf14013545be0e90c0.zip
ok, these should fix the unread tracking bugs (yeah, actually two of them). Watch out for any oddities if you directly link to posts... :o
git-svn-id: file:///svn/phpbb/trunk@7257 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/viewtopic.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 3e2ae7b408..ba02cfae0c 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -271,7 +271,7 @@ if ($post_id)
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
- $topic_data['prev_posts'] = $row['prev_posts'];
+ $topic_data['prev_posts'] = $row['prev_posts'] + 1;
}
}
@@ -1490,8 +1490,8 @@ if (isset($user->data['session_page']) && strpos($user->data['session_page'], '&
}
}
-// Only mark topic if it's currently unread
-if (isset($topic_tracking_info[$topic_id]) && $topic_data['topic_last_post_time'] > $topic_tracking_info[$topic_id])
+// Only mark topic if it's currently unread. Also make sure we do not set topic tracking back if earlier pages are viewed.
+if (isset($topic_tracking_info[$topic_id]) && $topic_data['topic_last_post_time'] > $topic_tracking_info[$topic_id] && $max_post_time > $topic_tracking_info[$topic_id])
{
markread('topic', $forum_id, $topic_id, $max_post_time);