mirror of
https://github.com/flarum/framework.git
synced 2025-03-15 00:05:12 +08: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:
parent
03d2d7eabb
commit
4bb3b2235d
@ -23,6 +23,6 @@ class PostTagFilter implements FilterInterface
|
||||
{
|
||||
$filterState->getQuery()
|
||||
->join('discussion_tag', 'discussion_tag.discussion_id', '=', 'posts.discussion_id')
|
||||
->where('discussion_tag.tag_id', $filterValue);
|
||||
->where('discussion_tag.tag_id', $negate ? '!=' : '=', $filterValue);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user