From 930026df2159b027bc035f4ed15c39a43eb0e9fe Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Wed, 17 Dec 2014 21:24:49 +0100 Subject: Fix bug with new file organisation entry_bottom.phtml didn't find $feed variable. It's fixed now. --- app/views/helpers/index/normal/entry_bottom.phtml | 4 ++-- app/views/helpers/index/normal/entry_header.phtml | 9 +-------- app/views/index/normal.phtml | 9 +++++++++ 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/app/views/helpers/index/normal/entry_bottom.phtml b/app/views/helpers/index/normal/entry_bottom.phtml index 704644f99..e1961e2aa 100644 --- a/app/views/helpers/index/normal/entry_bottom.phtml +++ b/app/views/helpers/index/normal/entry_bottom.phtml @@ -36,7 +36,7 @@
  • entry->link()); - $title = urlencode($this->entry->title() . ' · ' . $feed->name()); + $title = urlencode($this->entry->title() . ' · ' . $this->feed->name()); ?>
  • - +
  • diff --git a/app/views/helpers/index/normal/entry_header.phtml b/app/views/helpers/index/normal/entry_header.phtml index b751b884f..3d8b089b9 100644 --- a/app/views/helpers/index/normal/entry_header.phtml +++ b/app/views/helpers/index/normal/entry_header.phtml @@ -26,14 +26,7 @@ ?>categories, $this->entry->feed()); //We most likely already have the feed object in cache - if ($feed == null) { - $feed = $this->entry->feed(true); - if ($feed == null) { - $feed = FreshRSS_Feed::example(); - } - } - ?>
  • ✇ name(); ?>
  • + ?>
  • ✇ feed->name(); ?>
  • entry->title(); ?>
  • entry->date(); ?> 
  • diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml index fd2289365..f2e1c5012 100644 --- a/app/views/index/normal.phtml +++ b/app/views/index/normal.phtml @@ -25,6 +25,15 @@ if (!empty($this->entries)) { continue; } + // We most likely already have the feed object in cache + $this->feed = FreshRSS_CategoryDAO::findFeed($this->categories, $this->entry->feed()); + if ($this->feed == null) { + $this->feed = $this->entry->feed(true); + if ($this->feed == null) { + $this->feed = FreshRSS_Feed::example(); + } + } + if ($display_today && $this->entry->isDay(FreshRSS_Days::TODAY, $today)) { ?>