diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/EntryController.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index cef29990..ff90957b 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php | |||
@@ -532,8 +532,12 @@ class EntryController extends Controller | |||
532 | $searchTerm = (isset($request->get('search_entry')['term']) ? $request->get('search_entry')['term'] : ''); | 532 | $searchTerm = (isset($request->get('search_entry')['term']) ? $request->get('search_entry')['term'] : ''); |
533 | $currentRoute = (null !== $request->query->get('currentRoute') ? $request->query->get('currentRoute') : ''); | 533 | $currentRoute = (null !== $request->query->get('currentRoute') ? $request->query->get('currentRoute') : ''); |
534 | 534 | ||
535 | $sortBy = $request->get('sort', 'id'); | 535 | $sortBy = 'id'; |
536 | $direction = $request->get('direction', 'DESC'); | 536 | if (in_array($request->get('sort', 'id'), ['id', 'created_at', 'title', 'updated_at'], true)) { |
537 | $sortBy = $request->get('sort', 'id'); | ||
538 | } | ||
539 | |||
540 | $direction = 'DESC' === $request->get('direction') ? 'DESC' : 'ASC'; | ||
537 | 541 | ||
538 | switch ($type) { | 542 | switch ($type) { |
539 | case 'search': | 543 | case 'search': |