summaryrefslogtreecommitdiffstats
path: root/templates/part.items.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2012-10-15 22:43:47 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2012-10-15 22:43:47 +0200
commit3075733665f62cf1b0fbf14f40ae9e25c55fcc82 (patch)
treeaee9d85651555a0b2d48a10808de77dd6fe02452 /templates/part.items.php
parent347a34b722ef16cf499ec0cdefb2b18d7216a877 (diff)
fixed bug that prevented the additional feedtitle from showing up when no author was set
Diffstat (limited to 'templates/part.items.php')
-rw-r--r--templates/part.items.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/templates/part.items.php b/templates/part.items.php
index 72cf8393c..ebfe76b4f 100644
--- a/templates/part.items.php
+++ b/templates/part.items.php
@@ -34,13 +34,19 @@ foreach($items as $item) {
echo '<h1 class="item_title"><a target="_blank" href="' . $item->getUrl() . '">' . htmlspecialchars($item->getTitle(), ENT_QUOTES, 'UTF-8') . '</a></h1>';
if ((int)$lastViewedFeedType !== OCA\News\FeedType::FEED) {
- $feedTitle = '<span class="from_feed"> ' . $l->t('from') . ' ' . $item->getFeedTitle() . '</span>';
+ $feedTitle = '<span class="from_feed"> ' . $l->t('from') . ' ' . $item->getFeedTitle() . '</span> ';
} else {
$feedTitle = '';
}
- if(($item->getAuthor() !== null) && (trim($item->getAuthor()) != '')) {
- echo '<h2 class="item_author">'. $feedTitle . $l->t('by') . ' ' . htmlspecialchars($item->getAuthor(), ENT_QUOTES, 'UTF-8') . '</h2>';
+ if(($item->getAuthor() !== null) && (trim($item->getAuthor()) !== '')) {
+ $author = $l->t('by') . ' ' . htmlspecialchars($item->getAuthor(), ENT_QUOTES, 'UTF-8');
+ } else {
+ $author = '';
+ }
+
+ if(!($feedTitle === '' && $author === '')){
+ echo '<h2 class="item_author">'. $feedTitle . $author . '</h2>';
}
echo '<div class="body">' . $item->getBody() . '</div>';