htdocs/devinfo/index.php: fix error when there's no author info in Trac's rss item.
This commit is contained in:
parent
2a2212043f
commit
5fa41f5873
|
@ -78,8 +78,12 @@ the latest sources in a zip or tgz archive</a> from the github website.</p>
|
||||||
$feed->init();
|
$feed->init();
|
||||||
print("<ul class=\"rssfeeditems\">\n");
|
print("<ul class=\"rssfeeditems\">\n");
|
||||||
foreach ($feed->get_items() as $item) { //for the last timeline items...
|
foreach ($feed->get_items() as $item) { //for the last timeline items...
|
||||||
$author = $item->get_author();
|
if ($author = $item->get_author()) {
|
||||||
print(" <li><a href=\"".$item->get_link()."\">".$item->get_title()."</a> <em>by <strong>".$author->get_name()."</strong> on ".$item->get_date('Y-m-d')."</em></li>\n");
|
$author = trim($author->get_name());
|
||||||
|
} else {
|
||||||
|
$author = 'anonymous';
|
||||||
|
}
|
||||||
|
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("</ul>\n");
|
print("</ul>\n");
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue