diff options
-rw-r--r-- | templates/part.items.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/templates/part.items.php b/templates/part.items.php index 399274e30..da4855dc4 100644 --- a/templates/part.items.php +++ b/templates/part.items.php @@ -42,7 +42,12 @@ foreach($items as $item) { echo '<h1 class="item_title"><a target="_blank" href="' . $item->getUrl() . '">' . $item->getTitle() . '</a></h1>'; - echo '<h2 class="item_author">' . $l->t('from') . ' ' . parse_url($item->getUrl(), PHP_URL_HOST) . '</h2>'; + if(trim($item->getAuthor()) == ''){ + $from = $l->t('from') . ' ' . parse_url($item->getUrl(), PHP_URL_HOST); + } else { + $from = $l->t('from') . ' ' . $item->getAuthor(); + } + echo '<h2 class="item_author">' . $from . '</h2>'; echo '<div class="body">' . $item->getBody() . '</div>'; |