-
Bug
-
Resolution: Fixed
-
Minor
-
3.1.6
-
None
I am using the event: 'core.viewforum_modify_topics_data', but frustratingly, the data does not easily tell me which forum is being displayed. It would seem to be sensible to add forum_id as a parameter.
I can workaround the issue with the code:
{{ //find the forum id... Unfortunately the event only gives us the topic ids, so we have to lookup.
if (sizeof($topic_list))
{
// Generate topic forum list...
$rowset = array();
$rowset = $event['rowset'];
$row = array();
foreach ($topic_list as $topic_id)
{
$row = $rowset[$topic_id];
if(!($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL))
}
}}}
but it would be much tidier to have the value passed with the event (and it would work in the corner case where the event contains no topics).
Thinking a bit more... I think that there should be a policy that event data should always carry the identity of the instance that generated the event.