diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/EntryController.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index fc1697be..8c13255e 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php | |||
@@ -27,7 +27,7 @@ class EntryController extends Controller | |||
27 | * | 27 | * |
28 | * @return \Symfony\Component\HttpFoundation\Response | 28 | * @return \Symfony\Component\HttpFoundation\Response |
29 | */ | 29 | */ |
30 | public function searchFormAction(Request $request, $page) | 30 | public function searchFormAction(Request $request, $page, $currentRoute) |
31 | { | 31 | { |
32 | $form = $this->createForm(SearchEntryType::class); | 32 | $form = $this->createForm(SearchEntryType::class); |
33 | 33 | ||
@@ -39,6 +39,7 @@ class EntryController extends Controller | |||
39 | 39 | ||
40 | return $this->render('WallabagCoreBundle:Entry:search_form.html.twig', [ | 40 | return $this->render('WallabagCoreBundle:Entry:search_form.html.twig', [ |
41 | 'form' => $form->createView(), | 41 | 'form' => $form->createView(), |
42 | 'currentRoute' => $currentRoute, | ||
42 | ]); | 43 | ]); |
43 | } | 44 | } |
44 | 45 | ||
@@ -269,10 +270,11 @@ class EntryController extends Controller | |||
269 | { | 270 | { |
270 | $repository = $this->get('wallabag_core.entry_repository'); | 271 | $repository = $this->get('wallabag_core.entry_repository'); |
271 | $searchTerm = (isset($request->get('search_entry')['term']) ? $request->get('search_entry')['term'] : ''); | 272 | $searchTerm = (isset($request->get('search_entry')['term']) ? $request->get('search_entry')['term'] : ''); |
273 | $currentRoute = (!is_null($request->get('currentRoute')) ? $request->get('currentRoute') : ''); | ||
272 | 274 | ||
273 | switch ($type) { | 275 | switch ($type) { |
274 | case 'search': | 276 | case 'search': |
275 | $qb = $repository->getBuilderForSearchByUser($this->getUser()->getId(), $searchTerm); | 277 | $qb = $repository->getBuilderForSearchByUser($this->getUser()->getId(), $searchTerm, $currentRoute); |
276 | 278 | ||
277 | break; | 279 | break; |
278 | case 'untagged': | 280 | case 'untagged': |