Search queries: fixed broken order
This commit is contained in:
parent
9c0ed1e930
commit
6e62a46110
2 changed files with 3 additions and 3 deletions
|
@ -40,6 +40,7 @@ All of the above can be sorted using additional sorting tags:
|
||||||
- most commented first: [search]order:comments[/search]
|
- most commented first: [search]order:comments[/search]
|
||||||
- loved by most: [search]order:favs[/search]
|
- loved by most: [search]order:favs[/search]
|
||||||
- highest scored: [search]order:score[/search]
|
- highest scored: [search]order:score[/search]
|
||||||
|
- with most tags: [search]order:tags[/search]
|
||||||
|
|
||||||
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. If there is a "min" tag, there’s also its "max" counterpart, e.g. [search]favmax:7[/search].
|
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. If there is a "min" tag, there’s also its "max" counterpart, e.g. [search]favmax:7[/search].
|
||||||
|
|
||||||
|
|
|
@ -303,7 +303,6 @@ class Model_Post_QueryBuilder implements AbstractQueryBuilder
|
||||||
$orderColumn = 'fav_count';
|
$orderColumn = 'fav_count';
|
||||||
break;
|
break;
|
||||||
case 'score':
|
case 'score':
|
||||||
$orderDir *= -1;
|
|
||||||
$orderColumn = 'score';
|
$orderColumn = 'score';
|
||||||
break;
|
break;
|
||||||
case 'tag':
|
case 'tag':
|
||||||
|
@ -397,9 +396,9 @@ class Model_Post_QueryBuilder implements AbstractQueryBuilder
|
||||||
elseif ($key == 'order')
|
elseif ($key == 'order')
|
||||||
{
|
{
|
||||||
if ($neg)
|
if ($neg)
|
||||||
$orderToken = $val;
|
|
||||||
else
|
|
||||||
$orderToken = '-' . $val;
|
$orderToken = '-' . $val;
|
||||||
|
else
|
||||||
|
$orderToken = $val;
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue