mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
Fix export for same domain entries
This commit is contained in:
parent
dc02c679d2
commit
6639f7da6d
3 changed files with 40 additions and 9 deletions
|
@ -61,13 +61,21 @@ class ExportController extends AbstractController
|
|||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function downloadEntriesAction(Request $request, EntryRepository $entryRepository, TagRepository $tagRepository, EntriesExport $entriesExport, string $format, string $category)
|
||||
public function downloadEntriesAction(Request $request, EntryRepository $entryRepository, TagRepository $tagRepository, EntriesExport $entriesExport, string $format, string $category, int $entry = 0)
|
||||
{
|
||||
$method = ucfirst($category);
|
||||
$methodBuilder = 'getBuilderFor' . $method . 'ByUser';
|
||||
$title = $method;
|
||||
|
||||
if ('tag_entries' === $category) {
|
||||
if ('same_domain' === $category) {
|
||||
$entries = $entryRepository->getBuilderForSameDomainByUser(
|
||||
$this->getUser()->getId(),
|
||||
$request->get('entry')
|
||||
)->getQuery()
|
||||
->getResult();
|
||||
|
||||
$title = 'Same domain';
|
||||
} elseif ('tag_entries' === $category) {
|
||||
$tag = $tagRepository->findOneBySlug($request->query->get('tag'));
|
||||
|
||||
$entries = $entryRepository->findAllByTagId(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue