Properly use author name or author sort. fix #130

This commit is contained in:
Sébastien Lucas 2014-03-27 14:07:50 +01:00
parent f50e925c3d
commit 65b6931b13
5 changed files with 17 additions and 12 deletions

View file

@ -142,6 +142,10 @@ class Book extends Base {
return implode (", ", array_map (function ($author) { return $author->name; }, $this->getAuthors ()));
}
public function getAuthorsSort () {
return implode (", ", array_map (function ($author) { return $author->sort; }, $this->getAuthors ()));
}
public function getPublisher () {
if (is_null ($this->publisher)) {
$this->publisher = Publisher::getPublisherByBookId ($this->id);