Cleanly handle suggestion title. re #34

This commit is contained in:
Sébastien Lucas 2013-10-06 18:58:16 +02:00
parent 23129b9c9e
commit 3e98615ea9
2 changed files with 12 additions and 8 deletions

View file

@ -287,14 +287,17 @@ class Entry
return date (DATE_ATOM, self::$updated);
}
public function getContentArray () {
$navlink = "#";
public function getNavLink () {
foreach ($this->linkArray as $link) {
if ($link->type != Link::OPDS_NAVIGATION_TYPE) { continue; }
$navlink = $link->hrefXhtml ();
return $link->hrefXhtml ();
}
return array ( "title" => $this->title, "content" => $this->content, "navlink" => $navlink );
return "#";
}
public function getContentArray () {
return array ( "title" => $this->title, "content" => $this->content, "navlink" => $this->getNavLink () );
}
public function __construct($ptitle, $pid, $pcontent, $pcontentType, $plinkArray) {