aboutsummaryrefslogtreecommitdiff
path: root/app/views/index/reader.phtml
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2022-08-08 12:04:02 +0200
committerGravatar GitHub <noreply@github.com> 2022-08-08 12:04:02 +0200
commit82ac1d1e676f93b1567eba608c00c6edaf401a9e (patch)
tree1b3609df25f3eb1892aa7d359f52b82d680830a7 /app/views/index/reader.phtml
parent240afa7d4dcf33de4575a1531e2db3c9f4400c1f (diff)
Refactor entry-to-GReader API format (#4490)
* Refactor entry to GReader API format Some code was copied in two locations and not completely uniform. Cleaning of related variables and functions (e.g. better types for entries and categories as objects vs. as IDs). Usecase: I need to call the same GReader-compatible serialization from an extension * Fixed some edge cases * Keep summary instead of content `summary` and `content` seems to be used interchangeably in the Google Reader API. We have been using `summary` for our client API and `content` in our export/import, so stick to that.
Diffstat (limited to 'app/views/index/reader.phtml')
-rw-r--r--app/views/index/reader.phtml8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml
index c9ef7fbd9..334cd4189 100644
--- a/app/views/index/reader.phtml
+++ b/app/views/index/reader.phtml
@@ -47,12 +47,12 @@ $MAX_TAGS_DISPLAYED = FreshRSS_Context::$user_conf->show_tags_max;
}
?><div class="flux<?= !$item->isRead() ? ' not_read' : '' ?><?= $item->isFavorite() ? ' favorite' : '' ?>" id="flux_<?= $item->id() ?>">
<article class="flux_content" dir="auto">
-
+
<div class="content <?= $content_width ?>">
<header>
<?php
- $feed = FreshRSS_CategoryDAO::findFeed($this->categories, $item->feed()); //We most likely already have the feed object in cache
- if (empty($feed)) $feed = $item->feed(true);
+ $feed = FreshRSS_CategoryDAO::findFeed($this->categories, $item->feedId()); //We most likely already have the feed object in cache
+ if ($feed == null) $feed = $item->feed();
$favoriteUrl = array('c' => 'entry', 'a' => 'bookmark', 'params' => array('id' => $item->id()));
if ($item->isFavorite()) {
$favoriteUrl['params']['is_favorite'] = 0;
@@ -134,7 +134,7 @@ $MAX_TAGS_DISPLAYED = FreshRSS_Context::$user_conf->show_tags_max;
</div>
<?php } ?>
</header>
-
+
<div class="text">
<?= $item->content() ?>
</div>