diff --git a/TODO b/TODO index 77383c93..fc3fb5ed 100644 --- a/TODO +++ b/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 diff --git a/src/SearchServices/Filters/PostFilter.php b/src/SearchServices/Filters/PostFilter.php index 207cb979..269e96e7 100644 --- a/src/SearchServices/Filters/PostFilter.php +++ b/src/SearchServices/Filters/PostFilter.php @@ -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'; diff --git a/src/SearchServices/Parsers/PostSearchParser.php b/src/SearchServices/Parsers/PostSearchParser.php index d11d51db..80f3c6f8 100644 --- a/src/SearchServices/Parsers/PostSearchParser.php +++ b/src/SearchServices/Parsers/PostSearchParser.php @@ -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;