diff options
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/session.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index b01d0b2281..9cf19e4302 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -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; |