diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-03-17 12:51:32 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-03-17 12:51:32 +0000 |
commit | 4962db5f6715210d4e577fa843f82ffe61b47bc4 (patch) | |
tree | bba382a22c3dba0ae7548c62c32348f11e7e7dd5 /phpBB/includes/session.php | |
parent | 59ba11f18f9b43fc154018923c20dcc17db8ffa7 (diff) | |
download | forums-4962db5f6715210d4e577fa843f82ffe61b47bc4.tar forums-4962db5f6715210d4e577fa843f82ffe61b47bc4.tar.gz forums-4962db5f6715210d4e577fa843f82ffe61b47bc4.tar.bz2 forums-4962db5f6715210d4e577fa843f82ffe61b47bc4.tar.xz forums-4962db5f6715210d4e577fa843f82ffe61b47bc4.zip |
- fix some bugs...
git-svn-id: file:///svn/phpbb/trunk@5643 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/session.php')
-rw-r--r-- | phpBB/includes/session.php | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 4340a77605..c2fd77e7ef 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -321,7 +321,7 @@ class session /* 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);*/ + print_r($this->data); if ($this->data['user_id'] != ANONYMOUS) { @@ -345,6 +345,15 @@ class session { $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()); + } + else + { + $this->data['session_last_visit'] = time(); + } // At this stage we should have a filled data array, defined cookie u and k data. // data array should contain recent session info if we're a real user and a recent @@ -867,6 +876,8 @@ class user extends session // User has wrong style if (!$this->theme && $style == $this->data['user_style']) { + echo "HERE"; + exit; $style = $this->data['user_style'] = $config['default_style']; $sql = 'UPDATE ' . USERS_TABLE . " @@ -880,7 +891,7 @@ class user extends session AND t.template_id = s.template_id AND c.theme_id = s.theme_id AND i.imageset_id = s.imageset_id"; - $result = $db->sql_query($sql); + $result = $db->sql_query($sql, 3600); $this->theme = $db->sql_fetchrow($result); $db->sql_freeresult($result); } @@ -892,7 +903,7 @@ class user extends session // Now parse the cfg file and cache it $parsed_items = $cache->obtain_cfg_items($this->theme); - + // We are only interested in the theme configuration for now $parsed_items = $parsed_items['theme']; |