mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-29 04:50:51 +02:00
- 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
This commit is contained in:
@@ -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() . "
|
||||
|
Reference in New Issue
Block a user