From 3075733665f62cf1b0fbf14f40ae9e25c55fcc82 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Mon, 15 Oct 2012 22:43:47 +0200 Subject: fixed bug that prevented the additional feedtitle from showing up when no author was set --- templates/part.items.php | 12 +++++++++--- 1 file 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 '

' . htmlspecialchars($item->getTitle(), ENT_QUOTES, 'UTF-8') . '

'; if ((int)$lastViewedFeedType !== OCA\News\FeedType::FEED) { - $feedTitle = ' ' . $l->t('from') . ' ' . $item->getFeedTitle() . ''; + $feedTitle = ' ' . $l->t('from') . ' ' . $item->getFeedTitle() . ' '; } else { $feedTitle = ''; } - if(($item->getAuthor() !== null) && (trim($item->getAuthor()) != '')) { - echo '

'. $feedTitle . $l->t('by') . ' ' . htmlspecialchars($item->getAuthor(), ENT_QUOTES, 'UTF-8') . '

'; + if(($item->getAuthor() !== null) && (trim($item->getAuthor()) !== '')) { + $author = $l->t('by') . ' ' . htmlspecialchars($item->getAuthor(), ENT_QUOTES, 'UTF-8'); + } else { + $author = ''; + } + + if(!($feedTitle === '' && $author === '')){ + echo '

'. $feedTitle . $author . '

'; } echo '
' . $item->getBody() . '
'; -- cgit v1.2.3