From 9b5552290445b404e6de0595d7d27a2de824230a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 24 Apr 2020 15:16:58 +0200 Subject: Fixed UI --- src/Wallabag/CoreBundle/Controller/EntryController.php | 3 +-- src/Wallabag/CoreBundle/Controller/TagController.php | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Wallabag/CoreBundle/Controller') diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 85e71116..6e56c237 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -532,6 +532,7 @@ class EntryController extends Controller $repository = $this->get('wallabag_core.entry_repository'); $searchTerm = (isset($request->get('search_entry')['term']) ? $request->get('search_entry')['term'] : ''); $currentRoute = (null !== $request->query->get('currentRoute') ? $request->query->get('currentRoute') : ''); + $direction = (null !== $request->query->get('entry_sort')['sortOrder'] ? $request->query->get('entry_sort')['sortOrder'] : 'asc'); // defined as null by default because each repository method have the right field as default value too // like `getBuilderForStarredByUser` will have `starredAt` sort by default @@ -540,8 +541,6 @@ class EntryController extends Controller $sortBy = $request->get('entry_sort')['sortType']; } - $direction = isset($request->get('entry_sort')['sortOrder']) ? 'DESC' : 'ASC'; - switch ($type) { case 'search': $qb = $repository->getBuilderForSearchByUser($this->getUser()->getId(), $searchTerm, $currentRoute); diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php index 16ded948..06a91e1e 100644 --- a/src/Wallabag/CoreBundle/Controller/TagController.php +++ b/src/Wallabag/CoreBundle/Controller/TagController.php @@ -131,6 +131,7 @@ class TagController extends Controller return $this->render('WallabagCoreBundle:Entry:entries.html.twig', [ 'form' => null, + 'sortForm' => null, 'entries' => $entries, 'currentPage' => $page, 'tag' => $tag, -- cgit v1.2.3