diff options
author | David M <davidmj@users.sourceforge.net> | 2006-03-06 23:45:21 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2006-03-06 23:45:21 +0000 |
commit | 91720e826f14130485ccc306a93e5dd0fbf2946f (patch) | |
tree | b5238c4c1f0f0b7a31f790d7035c76f90d27a214 /phpBB/viewtopic.php | |
parent | 21f3fbc4be201a4fa277e65d30e694f0f75cb6ff (diff) | |
download | forums-91720e826f14130485ccc306a93e5dd0fbf2946f.tar forums-91720e826f14130485ccc306a93e5dd0fbf2946f.tar.gz forums-91720e826f14130485ccc306a93e5dd0fbf2946f.tar.bz2 forums-91720e826f14130485ccc306a93e5dd0fbf2946f.tar.xz forums-91720e826f14130485ccc306a93e5dd0fbf2946f.zip |
Weee! My turn to bug things up :D
- A moved topic has _two_ forum_ids, we must update the tracking info on the "fake" forum and the "real" forum.
- Welcome back to register_globals! :P
git-svn-id: file:///svn/phpbb/trunk@5608 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r-- | phpBB/viewtopic.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 843b4c2c02..bd4a2a96b3 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -210,6 +210,7 @@ if (!($topic_data = $db->sql_fetchrow($result))) trigger_error('NO_TOPIC'); } +$old_forum_id = $forum_id; $forum_id = (int) $topic_data['forum_id']; $topic_id = (int) $topic_data['topic_id']; @@ -1363,6 +1364,12 @@ if (isset($user->data['session_page']) && !preg_match("#&t=$topic_id#", $user->d if (isset($topic_tracking_info[$topic_id]) && $topic_data['topic_last_post_time'] > $topic_tracking_info[$topic_id]) { markread('topic', $forum_id, $topic_id, $max_post_time); + + // The topic has two different forum_id numbers, we have to update the other forum + if ($old_forum_id !== $forum_id) + { + markread('topic', $old_forum_id, $topic_id, $max_post_time); + } } // Change encoding if appropriate |