Actually show the "by author" info when it's not null.
This commit is contained in:
parent
5fa41f5873
commit
c59b9aabab
|
@ -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");
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue