Added order:tag_count support to post searching
This commit is contained in:
parent
81c2025203
commit
e0ced89a9b
3 changed files with 4 additions and 1 deletions
1
TODO
1
TODO
|
@ -29,7 +29,6 @@ everything related to posts:
|
|||
- order:time
|
||||
- order:score
|
||||
- order:comment_count
|
||||
- order:tag_count
|
||||
- order:comment_time
|
||||
- order:file_size
|
||||
- order:random (at least unstable version)
|
||||
|
|
|
@ -5,6 +5,7 @@ class PostFilter extends BasicFilter implements IFilter
|
|||
{
|
||||
const ORDER_FAV_TIME = 'lastFavTime';
|
||||
const ORDER_FAV_COUNT = 'favCount';
|
||||
const ORDER_TAG_COUNT = 'tagCount';
|
||||
|
||||
const REQUIREMENT_TAG = 'tag';
|
||||
const REQUIREMENT_ID = 'id';
|
||||
|
|
|
@ -40,6 +40,9 @@ class PostSearchParser extends AbstractSearchParser
|
|||
elseif ($token === 'fav_count')
|
||||
return \Szurubooru\SearchServices\Filters\PostFilter::ORDER_FAV_COUNT;
|
||||
|
||||
elseif ($token === 'tag_count')
|
||||
return \Szurubooru\SearchServices\Filters\PostFilter::ORDER_TAG_COUNT;
|
||||
|
||||
throw new \BadMethodCallException('Not supported');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue