aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewforum.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-05-19 21:08:48 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-05-19 21:08:48 +0000
commit8e800e333ceae99945cb818709a4aba4de3362b0 (patch)
tree48eb98a09be564dd57b2df95753a56a0f2d5319f /phpBB/viewforum.php
parentc0e3a86ebb9297f15681de6107acaef58eb41ccb (diff)
downloadforums-8e800e333ceae99945cb818709a4aba4de3362b0.tar
forums-8e800e333ceae99945cb818709a4aba4de3362b0.tar.gz
forums-8e800e333ceae99945cb818709a4aba4de3362b0.tar.bz2
forums-8e800e333ceae99945cb818709a4aba4de3362b0.tar.xz
forums-8e800e333ceae99945cb818709a4aba4de3362b0.zip
- fixed dotted topics on some occassions being wrong
- fixed post author change - fixed moving topics (they should not count into read tracking now) - think about having only one column for shadow topics/similar to forum links - moved a function from functions.php to functions_display.php (this function is only used by viewtopic and viewforum which already include this file) - some rather tiny fixes for mssql git-svn-id: file:///svn/phpbb/trunk@5933 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewforum.php')
-rw-r--r--phpBB/viewforum.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index bf2eea2b2a..3f8aa22367 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -386,8 +386,7 @@ if ($forum_data['forum_type'] == FORUM_POST || (($forum_data['forum_flags'] & 16
$row = &$rowset[$topic_id];
// This will allow the style designer to output a different header
- // or even seperate the list of announcements from sticky and normal
- // topics
+ // or even seperate the list of announcements from sticky and normal topics
$s_type_switch_test = ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL) ? 1 : 0;
// Replies
@@ -396,9 +395,12 @@ if ($forum_data['forum_type'] == FORUM_POST || (($forum_data['forum_flags'] & 16
if ($row['topic_status'] == ITEM_MOVED)
{
$topic_id = $row['topic_moved_id'];
+ $unread_topic = false;
+ }
+ else
+ {
+ $unread_topic = (isset($topic_tracking_info[$topic_id]) && $row['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
}
-
- $unread_topic = (isset($topic_tracking_info[$topic_id]) && $row['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
// Get folder img, topic status/type related informations
$folder_img = $folder_alt = $topic_type = '';
@@ -476,6 +478,7 @@ if ($forum_data['forum_type'] == FORUM_POST || (($forum_data['forum_flags'] & 16
LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON (tt.user_id = ' . $user->data['user_id'] . ' AND tt.topic_id = t.topic_id)
WHERE t.forum_id = ' . $forum_id . '
AND t.topic_last_post_time > ' . $mark_time_forum . '
+ AND t.topic_moved_id = 0
AND tt.topic_id IS NULL
GROUP BY t.forum_id';
$result = $db->sql_query($sql);
@@ -497,7 +500,8 @@ if ($forum_data['forum_type'] == FORUM_POST || (($forum_data['forum_flags'] & 16
{
$sql = 'SELECT topic_id FROM ' . TOPICS_TABLE . '
WHERE forum_id = ' . $forum_id . '
- AND topic_last_post_time > ' . $mark_time_forum;
+ AND topic_last_post_time > ' . $mark_time_forum . '
+ AND topic_moved_id = 0';
$result = $db->sql_query($sql);
$check_forum = $tracking_topics['tf'][$forum_id];