diff --git a/public_html/templates/help.tpl b/public_html/templates/help.tpl index b31f9d3a..c39fc8c6 100644 --- a/public_html/templates/help.tpl +++ b/public_html/templates/help.tpl @@ -159,17 +159,17 @@ var table = [ {search: 'order:random', description: 'as random as it can get'}, {search: 'order:id', description: 'highest to lowest post ID (default browse view)'}, - {search: 'order:time', description: 'newest to oldest (pretty much same as above)'}, - {search: '-order:time', description: 'oldest to newest'}, - {search: 'order:time,asc', description: 'oldest to newest (ascending order, default = descending)'}, + {search: 'order:date', description: 'newest to oldest (pretty much same as above)'}, + {search: '-order:date', description: 'oldest to newest'}, + {search: 'order:date,asc', description: 'oldest to newest (ascending order, default = descending)'}, {search: 'order:score', description: 'highest scored'}, {search: 'order:file_size', description: 'largest files first'}, {search: 'order:tag_count', description: 'with most tags'}, {search: 'order:fav_count', description: 'loved by most'}, {search: 'order:comment_count', description: 'most commented first'}, - {search: 'order:fav_time', description: 'recently added to favorites'}, - {search: 'order:comment_time', description: 'recently commented'}, - {search: 'order:feature_time', description: 'recently featured'}, + {search: 'order:fav_date', description: 'recently added to favorites'}, + {search: 'order:comment_date', description: 'recently commented'}, + {search: 'order:feature_date', description: 'recently featured'}, ]; _.each(table, function(row) { %> @@ -181,7 +181,7 @@

As shown with -order:time, any of them + href="#/posts/query=-order:date">-order:date, any of them can be reversed in the same way as negating other tags: by placing a dash before the tag.

diff --git a/src/SearchServices/Parsers/PostSearchParser.php b/src/SearchServices/Parsers/PostSearchParser.php index 0b3851b8..10fb0654 100644 --- a/src/SearchServices/Parsers/PostSearchParser.php +++ b/src/SearchServices/Parsers/PostSearchParser.php @@ -109,7 +109,7 @@ class PostSearchParser extends AbstractSearchParser elseif ($tokenText === 'id') return PostFilter::ORDER_ID; - elseif ($tokenText === 'time') + elseif ($tokenText === 'time' or $tokenText === 'date') return PostFilter::ORDER_LAST_EDIT_TIME; elseif ($tokenText === 'score') @@ -127,13 +127,13 @@ class PostSearchParser extends AbstractSearchParser elseif ($tokenText === 'comment_count') return PostFilter::ORDER_COMMENT_COUNT; - elseif ($tokenText === 'fav_time') + elseif ($tokenText === 'fav_time' or $tokenText === 'fav_date') return PostFilter::ORDER_LAST_FAV_TIME; - elseif ($tokenText === 'comment_time') + elseif ($tokenText === 'comment_time' or $tokenText === 'comment_date') return PostFilter::ORDER_LAST_COMMENT_TIME; - elseif ($tokenText === 'feature_time') + elseif ($tokenText === 'feature_time' or $tokenText === 'feature_date') return PostFilter::ORDER_LAST_FEATURE_TIME; else diff --git a/src/SearchServices/Parsers/TagSearchParser.php b/src/SearchServices/Parsers/TagSearchParser.php index 6d3bd569..69f065b0 100644 --- a/src/SearchServices/Parsers/TagSearchParser.php +++ b/src/SearchServices/Parsers/TagSearchParser.php @@ -31,7 +31,7 @@ class TagSearchParser extends AbstractSearchParser elseif ($tokenText === 'name') return TagFilter::ORDER_NAME; - elseif ($tokenText === 'creation_time') + elseif ($tokenText === 'creation_time' or $tokenText === 'creation_date') return TagFilter::ORDER_CREATION_TIME; elseif ($tokenText === 'usage_count') diff --git a/src/SearchServices/Parsers/UserSearchParser.php b/src/SearchServices/Parsers/UserSearchParser.php index 7dd204c6..2ecd2cd6 100644 --- a/src/SearchServices/Parsers/UserSearchParser.php +++ b/src/SearchServices/Parsers/UserSearchParser.php @@ -28,7 +28,7 @@ class UserSearchParser extends AbstractSearchParser if ($tokenText === 'name') return UserFilter::ORDER_NAME; - elseif ($tokenText === 'registration_time') + elseif ($tokenText === 'registration_time' or $tokenText === 'registration_date') return UserFilter::ORDER_REGISTRATION_TIME; else