Changed default order to descending

This commit is contained in:
Marcin Kurczewski 2014-09-28 11:51:54 +02:00
parent f090a752f0
commit 8c108ccfbf
2 changed files with 5 additions and 5 deletions

View file

@ -1,13 +1,13 @@
<div id="user-list">
<ul class="order">
<li>
<a class="big-button" data-order="name">Sort A&rarr;Z</a>
<a class="big-button" data-order="name,asc">Sort A&rarr;Z</a>
</li>
<li>
<a class="big-button" data-order="name,desc">Sort Z&rarr;A</a>
</li>
<li>
<a class="big-button" data-order="registrationTime">Sort old&rarr;new</a>
<a class="big-button" data-order="registrationTime,asc">Sort old&rarr;new</a>
</li>
<li>
<a class="big-button" data-order="registrationTime,desc">Sort new&rarr;old</a>

View file

@ -70,9 +70,9 @@ abstract class AbstractSearchParser
{
$token = preg_split('/,|\s+/', $token);
$orderToken = $token[0];
$orderDir = (count($token) === 2 and $token[1] === 'desc')
? \Szurubooru\SearchServices\Filters\IFilter::ORDER_DESC
: \Szurubooru\SearchServices\Filters\IFilter::ORDER_ASC;
$orderDir = (count($token) === 2 and $token[1] === 'asc')
? \Szurubooru\SearchServices\Filters\IFilter::ORDER_ASC
: \Szurubooru\SearchServices\Filters\IFilter::ORDER_DESC;
$orderColumn = $this->getOrderColumn($orderToken);
if ($orderColumn === null)