mattrogowski
Well-known member
- Affected version
- 2.2.13
If you make an API call to read threads within a forum, the forum type handler filters don't get applied. So if you have a question forum and requested
I'm not sure if this is an intentional decision or a bug, but it only needs 2 lines to fix, within
I've had to extend this function to add these in so one of our addons works as expected, but I was surprised that it was necessary.
/api/forums/12/threads?solved=1
the filter isn't applied and all threads are returned.I'm not sure if this is an intentional decision or a bug, but it only needs 2 lines to fix, within
XF\Api\ControllerPlugin\Thread::applyThreadListFilters()
:
PHP:
$filters = $forum->TypeHandler->getForumFilterInput($forum, $this->request, $filters);
$forum->TypeHandler->applyForumFilters($forum, $threadFinder, $filters);
I've had to extend this function to add these in so one of our addons works as expected, but I was surprised that it was necessary.