Skip to content

Commit

Permalink
Merge pull request #4176 from Elsensee/ticket/14409
Browse files Browse the repository at this point in the history
[ticket/14409] Update session page info before displaying online list
  • Loading branch information
nickvergessen committed Feb 13, 2016
2 parents 4f07a0b + 1bd4895 commit 9590ff3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions phpBB/includes/functions.php
Expand Up @@ -4969,6 +4969,8 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
}
}

$user->update_session_infos();

// Generate logged in/logged out status
if ($user->data['user_id'] != ANONYMOUS)
{
Expand Down Expand Up @@ -5395,8 +5397,6 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler =
return;
}

$user->update_session_infos();

phpbb_check_and_display_sql_report($request, $auth, $db);

$template->assign_vars(array(
Expand Down
4 changes: 2 additions & 2 deletions phpBB/includes/functions_acp.php
Expand Up @@ -55,6 +55,8 @@ function adm_page_header($page_title)
return;
}

$user->update_session_infos();

// gzip_compression
if ($config['gzip_compress'])
{
Expand Down Expand Up @@ -164,8 +166,6 @@ function adm_page_footer($copyright_html = true)
return;
}

$user->update_session_infos();

phpbb_check_and_display_sql_report($request, $auth, $db);

$template->assign_vars(array(
Expand Down
2 changes: 2 additions & 0 deletions phpBB/phpbb/session.php
Expand Up @@ -1583,6 +1583,8 @@ public function update_session_infos()

$db->sql_return_on_error(false);

$this->data = array_merge($this->data, $sql_ary);

if ($this->data['user_id'] != ANONYMOUS && !empty($config['new_member_post_limit']) && $this->data['user_new'] && $config['new_member_post_limit'] <= $this->data['user_posts'])
{
$this->leave_newly_registered();
Expand Down
2 changes: 2 additions & 0 deletions phpBB/viewonline.php
Expand Up @@ -85,6 +85,8 @@
page_footer();
}

$user->update_session_infos();

// Forum info
$sql_ary = array(
'SELECT' => 'f.forum_id, f.forum_name, f.parent_id, f.forum_type, f.left_id, f.right_id',
Expand Down

0 comments on commit 9590ff3

Please sign in to comment.