aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Controller
diff options
context:
space:
mode:
authorKevin Decherf <kevin@kdecherf.com>2020-02-04 22:19:45 +0100
committerKevin Decherf <kevin@kdecherf.com>2020-02-23 00:43:21 +0100
commit93c5b47e8891282693cc8bb1fedfb4af06d699b0 (patch)
treef86cf7875a4c6213043b761f8df0d257f7a4ffbc /src/Wallabag/CoreBundle/Controller
parent3bf941c4a422237f678fd47a67b26e1b27f159ba (diff)
downloadwallabag-93c5b47e8891282693cc8bb1fedfb4af06d699b0.tar.gz
wallabag-93c5b47e8891282693cc8bb1fedfb4af06d699b0.tar.zst
wallabag-93c5b47e8891282693cc8bb1fedfb4af06d699b0.zip
ExportController: fix entries export from search view
Fixes #4240 Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller')
-rw-r--r--src/Wallabag/CoreBundle/Controller/ExportController.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/ExportController.php b/src/Wallabag/CoreBundle/Controller/ExportController.php
index 282fd733..cec8d499 100644
--- a/src/Wallabag/CoreBundle/Controller/ExportController.php
+++ b/src/Wallabag/CoreBundle/Controller/ExportController.php
@@ -68,6 +68,18 @@ class ExportController extends Controller
68 ); 68 );
69 69
70 $title = 'Tag ' . $tag->getLabel(); 70 $title = 'Tag ' . $tag->getLabel();
71 } elseif ('search' === $category) {
72 $searchTerm = (isset($request->get('search_entry')['term']) ? $request->get('search_entry')['term'] : '');
73 $currentRoute = (null !== $request->query->get('currentRoute') ? $request->query->get('currentRoute') : '');
74
75 $entries = $repository->getBuilderForSearchByUser(
76 $this->getUser()->getId(),
77 $searchTerm,
78 $currentRoute
79 )->getQuery()
80 ->getResult();
81
82 $title = 'Search ' . $searchTerm;
71 } else { 83 } else {
72 $entries = $repository 84 $entries = $repository
73 ->$methodBuilder($this->getUser()->getId()) 85 ->$methodBuilder($this->getUser()->getId())