aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
authorRuslan Uzdenov <rxu@mail.ru>2009-08-05 12:51:48 +0000
committerRuslan Uzdenov <rxu@mail.ru>2009-08-05 12:51:48 +0000
commit914687075da7769583e2752701121deee61ff525 (patch)
treeca122a9398478936a573b43dacfadb8be6470b80 /phpBB/viewtopic.php
parent58c0bd804fe40898b4c87444a07efb16e8e60750 (diff)
downloadforums-914687075da7769583e2752701121deee61ff525.tar
forums-914687075da7769583e2752701121deee61ff525.tar.gz
forums-914687075da7769583e2752701121deee61ff525.tar.bz2
forums-914687075da7769583e2752701121deee61ff525.tar.xz
forums-914687075da7769583e2752701121deee61ff525.zip
Fix bug #15729 - Global announcements marked as read if all new topics in forum are viewed
Authorised by: AcydBurn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9926 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index fc96f0c901..51a8682229 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -1582,10 +1582,10 @@ if (isset($user->data['session_page']) && !$user->data['is_bot'] && (strpos($use
// 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);
+ markread('topic', (($topic_data['topic_type'] == POST_GLOBAL) ? 0 : $forum_id), $topic_id, $max_post_time);
// Update forum info
- $all_marked_read = update_forum_tracking_info($forum_id, $topic_data['forum_last_post_time'], (isset($topic_data['forum_mark_time'])) ? $topic_data['forum_mark_time'] : false, false);
+ $all_marked_read = update_forum_tracking_info((($topic_data['topic_type'] == POST_GLOBAL) ? 0 : $forum_id), $topic_data['forum_last_post_time'], (isset($topic_data['forum_mark_time'])) ? $topic_data['forum_mark_time'] : false, false);
}
else
{