Actually show the "by author" info when it's not null.

This commit is contained in:
XhmikosR 2013-10-12 18:44:59 +03:00
parent 5fa41f5873
commit c59b9aabab
1 changed files with 3 additions and 3 deletions

View File

@ -79,11 +79,11 @@ the latest sources in a zip or tgz archive</a> from the github website.</p>
print("<ul class=\"rssfeeditems\">\n");
foreach ($feed->get_items() as $item) { //for the last timeline items...
if ($author = $item->get_author()) {
$author = trim($author->get_name());
$author = "by <strong>".trim($author->get_name())."</strong>";
} else {
$author = 'anonymous';
$author = null;
}
print(" <li><a href=\"".$item->get_link()."\">".$item->get_title()."</a> <em>by <strong>".$author."</strong> on ".$item->get_date('Y-m-d')."</em></li>\n");
print(" <li><a href=\"".$item->get_link()."\">".$item->get_title()."</a> <em>".$author." on ".$item->get_date('Y-m-d')."</em></li>\n");
}
print("</ul>\n");
?>