Reduced aliases for searches

This commit is contained in:
Marcin Kurczewski 2014-09-28 11:57:11 +02:00
parent 8c108ccfbf
commit e811b1a876
3 changed files with 15 additions and 15 deletions

24
TODO
View file

@ -30,13 +30,13 @@ everything related to posts:
- search filters
- submit:rr-
- comment:rr-
- comment: 3..5
- comment_count: 3..5
- fav:rr-
- fav:3..5
- fav_count:3..5
- score:3..5
- tag:3..5
- filesize:3K..5M
- imgsize:huge/large/medium/small
- tag_count:3..5
- file_size:3K..5M
- image_size:huge/large/medium/small
- hash:postName
- type:img/flash/yt/video
- special:liked
@ -45,14 +45,14 @@ everything related to posts:
- special:hidden
- search order
- order:id
- order:date
- order:time
- order:score
- order:comments
- order:favs
- order:tags
- order:commentdate
- order:favdate
- order:filesize
- order:comment_count
- order:fav_count
- order:tag_count
- order:comment_time
- order:fav_time
- order:file_size
- order:random (at least unstable version)
everything related to users:

View file

@ -7,10 +7,10 @@
<a class="big-button" data-order="name,desc">Sort Z&rarr;A</a>
</li>
<li>
<a class="big-button" data-order="registrationTime,asc">Sort old&rarr;new</a>
<a class="big-button" data-order="registration_time,asc">Sort old&rarr;new</a>
</li>
<li>
<a class="big-button" data-order="registrationTime,desc">Sort new&rarr;old</a>
<a class="big-button" data-order="registration_time,desc">Sort new&rarr;old</a>
</li>
</ul>

View file

@ -23,7 +23,7 @@ class UserSearchParser extends AbstractSearchParser
if ($token === 'name')
return \Szurubooru\SearchServices\Filters\UserFilter::ORDER_NAME;
if (in_array($token, ['registrationDate', 'registrationTime', 'registered', 'joinDate', 'joinTime', 'joined']))
elseif ($token === 'registration_time')
return \Szurubooru\SearchServices\Filters\UserFilter::ORDER_REGISTRATION_TIME;
return null;