1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-04 22:58:10 +02:00

[ticket/17212] Support updating session info when editing post with p=

PHPBB3-17212
This commit is contained in:
Marc Alexander 2023-11-09 21:08:31 +01:00
parent 43e69df080
commit 613582e2c5
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995
2 changed files with 9 additions and 1 deletions

View File

@ -1759,7 +1759,7 @@ class session
}
// Do not update the session page for ajax requests, so the view online still works as intended
$page_changed = $this->update_session_page && (!isset($this->data['session_page']) || $this->data['session_page'] != $this->page['page']) && !$request->is_ajax();
$page_changed = $this->update_session_page && (!isset($this->data['session_page']) || $this->data['session_page'] != $this->page['page'] || $this->data['session_forum_id'] != $this->page['forum']) && !$request->is_ajax();
// Only update session DB a minute or so after last update or if page changes
if ($this->time_now - (isset($this->data['session_time']) ? $this->data['session_time'] : 0) > 60 || $page_changed)

View File

@ -104,8 +104,16 @@ switch ($mode)
trigger_error('NO_POST');
}
if (!$forum_id)
{
$user->page['forum'] = (int) $topic_forum['forum_id'];
$user->update_session_page = true;
$user->update_session_infos();
}
$topic_id = (int) $topic_forum['topic_id'];
$forum_id = (int) $topic_forum['forum_id'];
break;
}