diff options
| author | 2014-12-17 21:24:49 +0100 | |
|---|---|---|
| committer | 2014-12-17 21:25:20 +0100 | |
| commit | 930026df2159b027bc035f4ed15c39a43eb0e9fe (patch) | |
| tree | 869efcd322b4bea510de7644508c86ce836dc011 | |
| parent | 76358846abe2eba95668d66d3847cbdfe3f8bcdc (diff) | |
Fix bug with new file organisation
entry_bottom.phtml didn't find $feed variable. It's fixed now.
| -rw-r--r-- | app/views/helpers/index/normal/entry_bottom.phtml | 4 | ||||
| -rw-r--r-- | app/views/helpers/index/normal/entry_header.phtml | 9 | ||||
| -rw-r--r-- | 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 @@ <li class="item"><?php if ($bottomline_sharing) { $link = urlencode($this->entry->link()); - $title = urlencode($this->entry->title() . ' · ' . $feed->name()); + $title = urlencode($this->entry->title() . ' · ' . $this->feed->name()); ?><div class="dropdown"> <div id="dropdown-share-<?php echo $this->entry->id();?>" class="dropdown-target"></div> <a class="dropdown-toggle" href="#dropdown-share-<?php echo $this->entry->id();?>"> @@ -48,7 +48,7 @@ <li class="dropdown-close"><a href="#close">❌</a></li> <?php foreach ($sharing as $share) :?> <li class="item share"> - <a target="_blank" href="<?php echo FreshRSS_Share::generateUrl(FreshRSS_Context::$conf->shares, $share, $this->entry->link(), $this->entry->title() . ' . ' . $feed->name())?>"> + <a target="_blank" href="<?php echo FreshRSS_Share::generateUrl(FreshRSS_Context::$conf->shares, $share, $this->entry->link(), $this->entry->title() . ' . ' . $this->feed->name())?>"> <?php echo _t($share['name']);?> </a> </li> 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 @@ ?></li><?php } } - $feed = FreshRSS_CategoryDAO::findFeed($this->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(); - } - } - ?><li class="item website"><a href="<?php echo _url('index', 'index', 'get', 'f_' . $feed->id()); ?>"><img class="favicon" src="<?php echo $feed->favicon(); ?>" alt="✇" /> <span><?php echo $feed->name(); ?></span></a></li> + ?><li class="item website"><a href="<?php echo _url('index', 'index', 'get', 'f_' . $this->feed->id()); ?>"><img class="favicon" src="<?php echo $this->feed->favicon(); ?>" alt="✇" /> <span><?php echo $this->feed->name(); ?></span></a></li> <li class="item title"><a target="_blank" href="<?php echo $this->entry->link(); ?>"><?php echo $this->entry->title(); ?></a></li> <?php if ($topline_date) { ?><li class="item date"><?php echo $this->entry->date(); ?> </li><?php } ?> <?php if ($topline_link) { ?><li class="item link"><a target="_blank" href="<?php echo $this->entry->link(); ?>"><?php echo _i('link'); ?></a></li><?php } ?> 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)) { ?><div class="day" id="day_today"><?php echo _t('today'); |
