summaryrefslogtreecommitdiff
path: root/app/views/helpers/export/articles.phtml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/helpers/export/articles.phtml')
-rw-r--r--app/views/helpers/export/articles.phtml11
1 files changed, 5 insertions, 6 deletions
diff --git a/app/views/helpers/export/articles.phtml b/app/views/helpers/export/articles.phtml
index 59a2c7ad7..2d1fcd133 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);
@@ -58,10 +56,11 @@ foreach ($this->entriesRaw as $entryRaw) {
'feedUrl' => $feed == null ? '' : $feed->url(),
)
);
+ $article['categories'][] = $entry->isRead() ? 'user/-/state/com.google/read' : 'user/-/state/com.google/unread';
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;
}