Added order:time support to post searching
This commit is contained in:
parent
57dc7c5fad
commit
ac78f3b4b8
3 changed files with 4 additions and 1 deletions
1
TODO
1
TODO
|
@ -25,7 +25,6 @@ everything related to posts:
|
|||
- special:disliked
|
||||
- special:fav
|
||||
- search order
|
||||
- order:time
|
||||
- order:comment_count
|
||||
- order:comment_time
|
||||
- order:file_size
|
||||
|
|
|
@ -8,6 +8,7 @@ class PostFilter extends BasicFilter implements IFilter
|
|||
const ORDER_FAV_COUNT = 'favCount';
|
||||
const ORDER_TAG_COUNT = 'tagCount';
|
||||
const ORDER_SCORE = 'score';
|
||||
const ORDER_LAST_EDIT_TIME = 'lastEditTime';
|
||||
|
||||
const REQUIREMENT_TAG = 'tag';
|
||||
const REQUIREMENT_ID = 'id';
|
||||
|
|
|
@ -46,6 +46,9 @@ class PostSearchParser extends AbstractSearchParser
|
|||
elseif ($token === 'tag_count')
|
||||
return \Szurubooru\SearchServices\Filters\PostFilter::ORDER_TAG_COUNT;
|
||||
|
||||
elseif ($token === 'time')
|
||||
return \Szurubooru\SearchServices\Filters\PostFilter::ORDER_LAST_EDIT_TIME;
|
||||
|
||||
elseif ($token === 'score')
|
||||
return \Szurubooru\SearchServices\Filters\PostFilter::ORDER_SCORE;
|
||||
|
||||
|
|
Loading…
Reference in a new issue