1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-19 23:32:02 +02:00

Merge pull request #5441 from 3D-I/ticket/15870

[ticket/15870] Add core.viewtopic_modify_forum_id
This commit is contained in:
Marc Alexander 2018-11-18 19:50:19 +01:00
commit f21a43be2f
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -263,6 +263,20 @@ if (!$topic_data)
$forum_id = (int) $topic_data['forum_id'];
/**
* Modify the forum ID to handle the correct display of viewtopic if needed
*
* @event core.viewtopic_modify_forum_id
* @var string forum_id forum ID
* @var array topic_data array of topic's data
* @since 3.2.5-RC1
*/
$vars = array(
'forum_id',
'topic_data',
);
extract($phpbb_dispatcher->trigger_event('core.viewtopic_modify_forum_id', compact($vars)));
// 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;