aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
authorkasimi <mail@kasimi.net>2017-10-23 22:36:29 +0200
committerkasimi <mail@kasimi.net>2017-10-23 22:36:29 +0200
commit60596eb6756e3d2181ee6670cd123911b04524bf (patch)
treef16f36c59fa7c6bd4ecb796bbf3b4b86454043d4 /phpBB/viewtopic.php
parent2c01fe67e9313565741f20d207ffb289b1d0b2d3 (diff)
downloadforums-60596eb6756e3d2181ee6670cd123911b04524bf.tar
forums-60596eb6756e3d2181ee6670cd123911b04524bf.tar.gz
forums-60596eb6756e3d2181ee6670cd123911b04524bf.tar.bz2
forums-60596eb6756e3d2181ee6670cd123911b04524bf.tar.xz
forums-60596eb6756e3d2181ee6670cd123911b04524bf.zip
[ticket/15060] Set correct forum id in user session data if f= is missing
PHPBB3-15060
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index c94675a741..3f117eef6b 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -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))
{