Added order:file_size

This commit is contained in:
Marcin Kurczewski 2014-03-04 17:33:38 +01:00
parent d6f02fb724
commit 1ce0429280
2 changed files with 4 additions and 0 deletions

View file

@ -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.

View file

@ -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