diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-08-07 10:42:22 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-08-07 10:42:22 +0000 |
commit | 9193878c057583fb719e1765a5445aac1acdf1bc (patch) | |
tree | c4750f399d2e7cc3af550620ad432687991ced9a /phpBB/includes | |
parent | b789628c57bca540c573fb04538abd277ca87e1e (diff) | |
download | forums-9193878c057583fb719e1765a5445aac1acdf1bc.tar forums-9193878c057583fb719e1765a5445aac1acdf1bc.tar.gz forums-9193878c057583fb719e1765a5445aac1acdf1bc.tar.bz2 forums-9193878c057583fb719e1765a5445aac1acdf1bc.tar.xz forums-9193878c057583fb719e1765a5445aac1acdf1bc.zip |
Fix session id assignment for bots (previously this bug related in bots creating a new session for every view, now bots are assigned one session like normal users - still no rotation).
If cookie is there but having an empty session try to get it through the url - but also resetting the user
git-svn-id: file:///svn/phpbb/trunk@6248 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/session.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 12ba3dba1e..118b969659 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -157,6 +157,13 @@ class session $SID = (defined('NEED_SID')) ? '?sid=' . $this->session_id : '?sid='; $_SID = (defined('NEED_SID')) ? $this->session_id : ''; + + if (empty($this->session_id)) + { + $this->session_id = $_SID = request_var('sid', ''); + $SID = '?sid=' . $this->session_id; + $this->cookie_data = array('u' => 0, 'k' => ''); + } } else { @@ -493,8 +500,8 @@ class session $this->set_login_key(); } - $SID = '?sid='; - $_SID = ''; + $SID = '?sid=' . $this->session_id; + $_SID = $this->session_id; if (!$bot) { @@ -504,8 +511,8 @@ class session $this->set_cookie('k', $this->cookie_data['k'], $cookie_expire); $this->set_cookie('sid', $this->session_id, $cookie_expire); - $SID = '?sid=' . $this->session_id; - $_SID = $this->session_id; + $SID = '?sid='; + $_SID = ''; unset($cookie_expire); } |