1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +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:
Meik Sievertsen
2009-03-28 18:34:09 +00:00
parent 45b22fd31f
commit e6ed42ed4d
3 changed files with 12 additions and 1 deletions

View File

@@ -726,6 +726,15 @@ class session
// Commented out because it will not allow forums to update correctly
// $db->sql_return_on_error(false);
// Something quite important: session_page always holds the *last* page visited, except for the *first* visit.
// We are not able to simply have an empty session_page btw, therefore we need to tell phpBB how to detect this special case.
// If the session id is empty, we have a completely new one and will set an "identifier" here. This identifier is able to be checked later.
if (empty($this->data['session_id']))
{
// This is a temporary variable, only set for the very first visit
$this->data['session_created'] = true;
}
$this->session_id = $this->data['session_id'] = md5(unique_id());
$sql_ary['session_id'] = (string) $this->session_id;