From 1c7c1016f4a5147003ed1c438b8a386a63a53cab Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 4 Sep 2023 10:09:37 +0200 Subject: Fix JSON export/import (#5626) * Fix import with empty content fix https://github.com/FreshRSS/FreshRSS/issues/5622 Cherry picks on https://github.com/FreshRSS/FreshRSS/pull/5584 * Fix export of tags / labels Article-defined tags were wrongly exported as user-defined labels. * Fix export of tags / labels Article-defined tags were wrongly exported as user-defined labels. * Fix bug with many labels * Better typing * Comments --- app/views/helpers/export/articles.phtml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'app/views/helpers/export') diff --git a/app/views/helpers/export/articles.phtml b/app/views/helpers/export/articles.phtml index 60041339b..1db627bf7 100644 --- a/app/views/helpers/export/articles.phtml +++ b/app/views/helpers/export/articles.phtml @@ -26,11 +26,7 @@ foreach ($this->entries as $entry) { $feed = $this->feed ?? FreshRSS_CategoryDAO::findFeed($this->categories, $entry->feedId()); $entry->_feed($feed); - if (isset($this->entryIdsTagNames['e_' . $entry->id()])) { - $entry->_tags($this->entryIdsTagNames['e_' . $entry->id()]); - } - - $article = $entry->toGReader('freshrss'); + $article = $entry->toGReader('freshrss', $this->entryIdsTagNames['e_' . $entry->id()] ?? []); $line = json_encode($article, $options); if ($line != '') { -- cgit v1.2.3