mirror of
https://github.com/flarum/core.git
synced 2025-06-10 16:44:59 +02:00
The negate field doesn't get used, which means you cant exclude tags (#3713)
e.g. This allows you to `/api/posts?sort=-createdAt&filter[tag]=14` to include tag 14 and `/api/posts?sort=-createdAt&filter[tag]=-14` to exclude tag 14
This commit is contained in:
@ -23,6 +23,6 @@ class PostTagFilter implements FilterInterface
|
|||||||
{
|
{
|
||||||
$filterState->getQuery()
|
$filterState->getQuery()
|
||||||
->join('discussion_tag', 'discussion_tag.discussion_id', '=', 'posts.discussion_id')
|
->join('discussion_tag', 'discussion_tag.discussion_id', '=', 'posts.discussion_id')
|
||||||
->where('discussion_tag.tag_id', $filterValue);
|
->where('discussion_tag.tag_id', $negate ? '!=' : '=', $filterValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user