1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-22 00:21:02 +01:00

Merge pull request #5012 from kasimi/ticket/15060

[ticket/15060] Set correct forum id in user session data if f= is missing
This commit is contained in:
Marc Alexander 2017-10-29 11:34:47 +01:00
commit d0e25f2eed
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -263,6 +263,10 @@ if (!$topic_data)
$forum_id = (int) $topic_data['forum_id'];
// If the request is missing the f parameter, the forum id in the user session data is 0 at the moment.
// Let's fix that now so that the user can't hide from the forum's Who Is Online list.
$user->page['forum'] = $forum_id;
// Now we know the forum_id and can check the permissions
if ($topic_data['topic_visibility'] != ITEM_APPROVED && !$auth->acl_get('m_approve', $forum_id))
{