mirror of
https://github.com/wallabag/wallabag.git
synced 2025-10-10 19:32:07 +00:00
Support sorting by reading time and URL in filter view
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
parent
7e8a3c432f
commit
5981cfb8b8
3 changed files with 5 additions and 1 deletions
|
@ -633,7 +633,7 @@ class EntryController extends AbstractController
|
|||
if (null !== $request->get('entry_filter') && null !== $request->get('entry_filter')['sortType'] && '' !== $request->get('entry_filter')['sortType']) {
|
||||
$direction = (null !== $request->get('entry_filter')['sortOrder'] && \in_array($request->get('entry_filter')['sortOrder'], ['asc', 'desc'], true)) ? $request->get('entry_filter')['sortOrder'] : 'desc';
|
||||
|
||||
if (\in_array($request->get('entry_filter')['sortType'], ['id','title','createdAt'], true)) {
|
||||
if (\in_array($request->get('entry_filter')['sortType'], ['id','title','createdAt', 'url', 'readingTime'], true)) {
|
||||
$sortBy = $request->get('entry_filter')['sortType'];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue