aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/session.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-04-29 13:14:33 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-04-29 13:14:33 +0000
commit859902ea243824b48d2b67d806cd622746bed00f (patch)
treef2b3d40656d471499fdf61389166f0818f88a168 /phpBB/includes/session.php
parent7bc05c5e24ca632f3aa5dfd1fe1e6bd145f9d34c (diff)
downloadforums-859902ea243824b48d2b67d806cd622746bed00f.tar
forums-859902ea243824b48d2b67d806cd622746bed00f.tar.gz
forums-859902ea243824b48d2b67d806cd622746bed00f.tar.bz2
forums-859902ea243824b48d2b67d806cd622746bed00f.tar.xz
forums-859902ea243824b48d2b67d806cd622746bed00f.zip
reverting changes to the installer
do not introduce a function we never call outside of common.php git-svn-id: file:///svn/phpbb/trunk@5859 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/session.php')
-rw-r--r--phpBB/includes/session.php34
1 files changed, 2 insertions, 32 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 3ea20541ab..cf074bb0c5 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -17,6 +17,7 @@ class session
var $session_id = '';
var $cookie_data = array();
var $browser = '';
+ var $host = '';
var $ip = '';
var $page = array();
var $current_page_filename = '';
@@ -112,6 +113,7 @@ class session
$this->time_now = time();
$this->browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? $_SERVER['HTTP_USER_AGENT'] : '';
+ $this->host = (!empty($_SERVER['HTTP_HOST'])) ? $_SERVER['HTTP_HOST'] : 'localhost';
$this->page = $this->extract_current_page($phpbb_root_path);
$this->page['page'] .= (isset($_POST['f'])) ? ((strpos($this->page['page'], '?') !== false) ? '&' : '?') . 'f=' . intval($_POST['f']) : '';
@@ -373,10 +375,6 @@ class session
$this->data = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
}
-/* echo "<br />$sql";
- echo "<br />$user_id :: " . sizeof($this->data) . " :: " . (int) is_array($this->data) . " :: " . $db->sql_numrows();
- print_r($this->cookie_data);
- print_r($this->data);*/
// If no data was returned one or more of the following occured:
// Key didn't match one in the DB
@@ -397,34 +395,6 @@ class session
$db->sql_freeresult($result);
}
-/* echo "<br />$sql";
- echo "<br />$user_id :: " . sizeof($this->data) . " :: " . (int) is_array($this->data) . " :: " . $db->sql_numrows();
- print_r($this->cookie_data);
- print_r($this->data);
-
- if ($this->data['user_id'] != ANONYMOUS)
- {
- $sql = 'SELECT session_time, session_id
- FROM ' . SESSIONS_TABLE . '
- WHERE session_user_id = ' . (int) $this->data['user_id'] . '
- ORDER BY session_time DESC';
- $result = $db->sql_query_limit($sql, 1);
-
- if ($sdata = $db->sql_fetchrow($result))
- {
- $this->data = array_merge($sdata, $this->data);
- unset($sdata);
- $this->session_id = $this->data['session_id'];
- }
- $db->sql_freeresult($result);
-
- $this->data['session_last_visit'] = (isset($this->data['session_time']) && $this->data['session_time']) ? $this->data['session_time'] : (($this->data['user_lastvisit']) ? $this->data['user_lastvisit'] : time());
- }
- else
- {
- $this->data['session_last_visit'] = time();
- }
-*/
if ($this->data['user_id'] != ANONYMOUS)
{
$this->data['session_last_visit'] = (isset($this->data['session_time']) && $this->data['session_time']) ? $this->data['session_time'] : (($this->data['user_lastvisit']) ? $this->data['user_lastvisit'] : time());