diff options
author | Kevin Decherf <kevin@kdecherf.com> | 2020-02-04 22:19:45 +0100 |
---|---|---|
committer | Kevin Decherf <kevin@kdecherf.com> | 2020-02-23 00:43:21 +0100 |
commit | 93c5b47e8891282693cc8bb1fedfb4af06d699b0 (patch) | |
tree | f86cf7875a4c6213043b761f8df0d257f7a4ffbc /src/Wallabag/CoreBundle/Controller | |
parent | 3bf941c4a422237f678fd47a67b26e1b27f159ba (diff) | |
download | wallabag-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.php | 12 |
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()) |