diff options
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']; |