Fix bug with new file organisation

entry_bottom.phtml didn't find $feed variable. It's fixed now.
This commit is contained in:
Marien Fressinaud committed 2014-12-17 21:25:20 +01:00
1 parent 76358846ab
commit 930026df21
3 files changed
+12 -10

No files matched your search

@@ -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>
@@ -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 } ?>
+9
View File
@@ -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');