If you wish to inject additional data into the forum/thread notification data, this appears to be very difficult without additional queries.
The problem is the following code construct:
(fetchColumns is only used in a handful of places inX F2)
$finder is typed, so ideally this would be moved into a ThreadWatch/ForumWatch filter method. Being able to use closures should make this quite doable, the alternative is replacing the entire function to add a single column, or doing stuff like extending fetchColumns in the finder to stash the data in a side-channel
Would this be better under a bug report or a suggestion?
The problem is the following code construct:
Code:
foreach ($finder->fetchColumns(['user_id', 'email_subscribe']) AS $watch)
{
$notifyData[$watch['user_id']] = [
'alert' => true,
'email' => (bool)$watch['email_subscribe']
];
}
$finder is typed, so ideally this would be moved into a ThreadWatch/ForumWatch filter method. Being able to use closures should make this quite doable, the alternative is replacing the entire function to add a single column, or doing stuff like extending fetchColumns in the finder to stash the data in a side-channel
Would this be better under a bug report or a suggestion?