From 2c470e4b27f4e5df4c996d6755ebbb1f7306d86a Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 31 May 2004 18:00:10 +0000 Subject: - added delete cookies link - fixed global announcement links in viewforum - do not display redirects in link forums as posts in forum overview git-svn-id: file:///svn/phpbb/trunk@4904 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewforum.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'phpBB/viewforum.php') diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 24a9829920..cb38d98041 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -68,6 +68,12 @@ else $sql_lastread = $lastread_select = ''; $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? unserialize(stripslashes($_COOKIE[$config['cookie_name'] . '_track'])) : array(); + + if (!isset($tracking_topics[$forum_id]) && $user->data['user_id'] != ANONYMOUS) + { + markread('mark', $forum_id); + redirect($user->cur_page); + } } $sql_from = ($sql_lastread) ? '((' . FORUMS_TABLE . ' f LEFT JOIN ' . FORUMS_WATCH_TABLE . ' fw ON (fw.forum_id = f.forum_id AND fw.user_id = ' . $user->data['user_id'] . ")) $sql_lastread)" : '(' . FORUMS_TABLE . ' f LEFT JOIN ' . FORUMS_WATCH_TABLE . ' fw ON (fw.forum_id = f.forum_id AND fw.user_id = ' . $user->data['user_id'] . '))'; @@ -412,7 +418,7 @@ if ($forum_data['forum_type'] == FORUM_POST || ($forum_data['forum_flags'] & 16) $topic_type = $user->lang['VIEW_TOPIC_MOVED']; $topic_id = $row['topic_moved_id']; - $folder_img = 'folder'; + $folder_img = 'folder_moved'; $folder_alt = 'Topic_Moved'; $newest_post_img = ''; } @@ -457,6 +463,7 @@ if ($forum_data['forum_type'] == FORUM_POST || ($forum_data['forum_flags'] & 16) if ($user->data['user_id'] != ANONYMOUS) { $unread_topic = $new_votes = true; + if ($mark_time_topic >= $row['topic_last_post_time'] || $mark_time_forum >= $row['topic_last_post_time'] || ($row['topic_last_post_time'] == $row['poll_last_vote'] && $replies)) { $unread_topic = false; @@ -499,7 +506,7 @@ if ($forum_data['forum_type'] == FORUM_POST || ($forum_data['forum_flags'] & 16) $times = 1; for($j = 0; $j < $replies + 1; $j += $config['posts_per_page']) { - $goto_page .= "$times"; + $goto_page .= "$times"; if ($times == 1 && $total_pages > 4) { $goto_page .= ' ... '; @@ -520,7 +527,7 @@ if ($forum_data['forum_type'] == FORUM_POST || ($forum_data['forum_flags'] & 16) } // Generate all the URIs ... - $view_topic_url = "viewtopic.$phpEx$SID&f=" . $row['forum_id'] . "&t=$topic_id"; + $view_topic_url = "viewtopic.$phpEx$SID&f=" . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&t=$topic_id"; $last_post_img = "' . $user->img('icon_post_latest', 'VIEW_LATEST_POST') . ''; @@ -592,7 +599,7 @@ if ($forum_data['forum_type'] == FORUM_POST || ($forum_data['forum_flags'] & 16) { if (($mark_time_topic && $row['topic_last_post_time'] > $mark_time_topic) || (!$mark_time_topic && $mark_time_forum && $row['topic_last_post_time'] > $mark_time_forum)) { - if (!$unread_topic && !empty($row['mark_time']) && $mark_time_topic) + if (isset($unread_topic) && !$unread_topic && !empty($row['mark_time']) && $mark_time_topic) { markread('topic', $forum_id, $topic_id); } -- cgit v1.2.1