From e6ed42ed4dde41812b88b47c6e5bb5c41402f14c Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 28 Mar 2009 18:34:09 +0000 Subject: - Add indicator to be used in code if session was created (user visits the site for the first time) - Correctly count topic views for guests visiting the website the first time by entering the topic directly (Bug #43445) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9411 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 02bb502075..495a536932 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1514,7 +1514,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) unset($rowset, $user_cache); // Update topic view and if necessary attachment view counters ... but only for humans and if this is the first 'page view' -if (isset($user->data['session_page']) && !$user->data['is_bot'] && strpos($user->data['session_page'], '&t=' . $topic_id) === false) +if (isset($user->data['session_page']) && !$user->data['is_bot'] && (strpos($user->data['session_page'], '&t=' . $topic_id) === false || isset($user->data['session_created']))) { $sql = 'UPDATE ' . TOPICS_TABLE . ' SET topic_views = topic_views + 1, topic_last_view_time = ' . time() . " -- cgit v1.2.1