*
* @return \Symfony\Component\HttpFoundation\Response
*/
- public function searchFormAction(Request $request, $page)
+ public function searchFormAction(Request $request, $page, $currentRoute)
{
$form = $this->createForm(SearchEntryType::class);
return $this->render('WallabagCoreBundle:Entry:search_form.html.twig', [
'form' => $form->createView(),
+ 'currentRoute' => $currentRoute,
]);
}
{
$repository = $this->get('wallabag_core.entry_repository');
$searchTerm = (isset($request->get('search_entry')['term']) ? $request->get('search_entry')['term'] : '');
+ $currentRoute = (!is_null($request->get('currentRoute')) ? $request->get('currentRoute') : '');
switch ($type) {
case 'search':
- $qb = $repository->getBuilderForSearchByUser($this->getUser()->getId(), $searchTerm);
+ $qb = $repository->getBuilderForSearchByUser($this->getUser()->getId(), $searchTerm, $currentRoute);
break;
case 'untagged':