diff --git a/data/help.md b/data/help.md index 02297223..80a1d8b8 100644 --- a/data/help.md +++ b/data/help.md @@ -64,6 +64,7 @@ Command | Description [search]order:tags[/search] | with most tags | `tag`, `tagcount`, `tag_count` | [search]order:commentdate[/search] | recently commented | `comment_date` | [search]order:favdate[/search] | recently added to favorites | `fav_date` | +[search]order:filesize[/search] | largest files first | `file_size` | As shown with [search]-order:date[/search], 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/Models/SearchParsers/PostSearchParser.php b/src/Models/SearchParsers/PostSearchParser.php index 58072389..162bf06a 100644 --- a/src/Models/SearchParsers/PostSearchParser.php +++ b/src/Models/SearchParsers/PostSearchParser.php @@ -244,6 +244,9 @@ class PostSearchParser extends AbstractSearchParser elseif (in_array($orderByString, ['favdate', 'fav_date'])) $orderColumn = 'post.fav_date'; + elseif (in_array($orderByString, ['filesize', 'file_size'])) + $orderColumn = 'post.file_size'; + elseif ($orderByString == 'random') { //seeding works like this: if you visit anything