aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2009-03-28 18:34:09 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2009-03-28 18:34:09 +0000
commite6ed42ed4dde41812b88b47c6e5bb5c41402f14c (patch)
tree32fecd81f8e70946643bbf618148637c098a11de /phpBB/viewtopic.php
parent45b22fd31f52fbdc884217efc573ccd13bdde92a (diff)
downloadforums-e6ed42ed4dde41812b88b47c6e5bb5c41402f14c.tar
forums-e6ed42ed4dde41812b88b47c6e5bb5c41402f14c.tar.gz
forums-e6ed42ed4dde41812b88b47c6e5bb5c41402f14c.tar.bz2
forums-e6ed42ed4dde41812b88b47c6e5bb5c41402f14c.tar.xz
forums-e6ed42ed4dde41812b88b47c6e5bb5c41402f14c.zip
- 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
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php2
1 files changed, 1 insertions, 1 deletions
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() . "