Fixed default sort style was set to ascending
This commit is contained in:
parent
806aa0f197
commit
b13c221a96
2 changed files with 4 additions and 4 deletions
|
@ -59,7 +59,7 @@ abstract class AbstractSearchParser
|
|||
{
|
||||
$arr = preg_split('/[;,]/', $orderToken);
|
||||
if (count($arr) == 1)
|
||||
$arr []= 'asc';
|
||||
$arr []= 'desc';
|
||||
|
||||
if (count($arr) != 2)
|
||||
throw new SimpleException('Invalid search order token: ' . $orderToken);
|
||||
|
|
|
@ -226,15 +226,15 @@ class PostSearchParser extends AbstractSearchParser
|
|||
elseif (in_array($orderByString, ['date']))
|
||||
$orderColumn = 'upload_date';
|
||||
|
||||
elseif (in_array($orderByString, ['score']))
|
||||
$orderColumn = 'score';
|
||||
|
||||
elseif (in_array($orderByString, ['comment', 'comments', 'commentcount', 'comment_count']))
|
||||
$orderColumn = 'comment_count';
|
||||
|
||||
elseif (in_array($orderByString, ['fav', 'favs', 'favcount', 'fav_count']))
|
||||
$orderColumn = 'fav_count';
|
||||
|
||||
elseif (in_array($orderByString, ['score']))
|
||||
$orderColumn = 'score';
|
||||
|
||||
elseif (in_array($orderByString, ['tag', 'tags', 'tagcount', 'tag_count']))
|
||||
$orderColumn = 'tag_count';
|
||||
|
||||
|
|
Loading…
Reference in a new issue