diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/EntryController.php | 3 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/TagController.php | 1 |
2 files changed, 2 insertions, 2 deletions
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 | |||
532 | $repository = $this->get('wallabag_core.entry_repository'); | 532 | $repository = $this->get('wallabag_core.entry_repository'); |
533 | $searchTerm = (isset($request->get('search_entry')['term']) ? $request->get('search_entry')['term'] : ''); | 533 | $searchTerm = (isset($request->get('search_entry')['term']) ? $request->get('search_entry')['term'] : ''); |
534 | $currentRoute = (null !== $request->query->get('currentRoute') ? $request->query->get('currentRoute') : ''); | 534 | $currentRoute = (null !== $request->query->get('currentRoute') ? $request->query->get('currentRoute') : ''); |
535 | $direction = (null !== $request->query->get('entry_sort')['sortOrder'] ? $request->query->get('entry_sort')['sortOrder'] : 'asc'); | ||
535 | 536 | ||
536 | // defined as null by default because each repository method have the right field as default value too | 537 | // defined as null by default because each repository method have the right field as default value too |
537 | // like `getBuilderForStarredByUser` will have `starredAt` sort by default | 538 | // like `getBuilderForStarredByUser` will have `starredAt` sort by default |
@@ -540,8 +541,6 @@ class EntryController extends Controller | |||
540 | $sortBy = $request->get('entry_sort')['sortType']; | 541 | $sortBy = $request->get('entry_sort')['sortType']; |
541 | } | 542 | } |
542 | 543 | ||
543 | $direction = isset($request->get('entry_sort')['sortOrder']) ? 'DESC' : 'ASC'; | ||
544 | |||
545 | switch ($type) { | 544 | switch ($type) { |
546 | case 'search': | 545 | case 'search': |
547 | $qb = $repository->getBuilderForSearchByUser($this->getUser()->getId(), $searchTerm, $currentRoute); | 546 | $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 | |||
131 | 131 | ||
132 | return $this->render('WallabagCoreBundle:Entry:entries.html.twig', [ | 132 | return $this->render('WallabagCoreBundle:Entry:entries.html.twig', [ |
133 | 'form' => null, | 133 | 'form' => null, |
134 | 'sortForm' => null, | ||
134 | 'entries' => $entries, | 135 | 'entries' => $entries, |
135 | 'currentPage' => $page, | 136 | 'currentPage' => $page, |
136 | 'tag' => $tag, | 137 | 'tag' => $tag, |