diff options
| author | 2019-01-16 22:26:43 +0100 | |
|---|---|---|
| committer | 2019-01-16 22:26:43 +0100 | |
| commit | 743c1b740bd8ec0b70f7058d4b52101b346a5e9c (patch) | |
| tree | 7d7c3145ee35b7b37dfc7cf0b7848e85bd3343be /app/views/helpers/export | |
| parent | 4355849ec36efb3aa4b711912abd71e30cf2d5ee (diff) | |
Export labels (#2217)
* Export labels
https://github.com/FreshRSS/FreshRSS/issues/2196
* Small fixes
* Backport code from 1.14.0
https://github.com/FreshRSS/FreshRSS/pull/2199/commits/4888f919f104b2d170302565e481a0b731eb4145
* More fixes
Diffstat (limited to 'app/views/helpers/export')
| -rw-r--r-- | app/views/helpers/export/articles.phtml | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/app/views/helpers/export/articles.phtml b/app/views/helpers/export/articles.phtml index 59a2c7ad7..eb2cb0924 100644 --- a/app/views/helpers/export/articles.phtml +++ b/app/views/helpers/export/articles.phtml @@ -16,14 +16,12 @@ $articles = array( echo rtrim(json_encode($articles, $options), " ]}\n\r\t"), "\n"; $first = true; -$tagDAO = FreshRSS_Factory::createTagDao(); -$entryIdsTagNames = $tagDAO->getEntryIdsTagNames($this->entriesRaw); -if ($entryIdsTagNames == false) { - $entryIdsTagNames = array(); +if (empty($this->entryIdsTagNames)) { + $this->entryIdsTagNames = array(); } foreach ($this->entriesRaw as $entryRaw) { - if (empty($entryRaw)) { + if ($entryRaw == null) { continue; } $entry = FreshRSS_EntryDAO::daoToEntry($entryRaw); @@ -61,7 +59,7 @@ foreach ($this->entriesRaw as $entryRaw) { if ($entry->isFavorite()) { $article['categories'][] = 'user/-/state/com.google/starred'; } - $tagNames = isset($entryIdsTagNames['e_' . $entry->id()]) ? $entryIdsTagNames['e_' . $entry->id()] : array(); + $tagNames = isset($this->entryIdsTagNames['e_' . $entry->id()]) ? $this->entryIdsTagNames['e_' . $entry->id()] : array(); foreach ($tagNames as $tagName) { $article['categories'][] = 'user/-/label/' . $tagName; } |
