| @@ 83-93 (lines=11) @@ | ||
| 80 | return new Author ($post); |
|
| 81 | } |
|
| 82 | ||
| 83 | public static function getAuthorByBookId ($bookId) { |
|
| 84 | $result = parent::getDb ()->prepare('select authors.id as id, authors.name as name, authors.sort as sort from authors, books_authors_link |
|
| 85 | where author = authors.id |
|
| 86 | and book = ?'); |
|
| 87 | $result->execute (array ($bookId)); |
|
| 88 | $authorArray = array (); |
|
| 89 | while ($post = $result->fetchObject ()) { |
|
| 90 | array_push ($authorArray, new Author ($post)); |
|
| 91 | } |
|
| 92 | return $authorArray; |
|
| 93 | } |
|
| 94 | } |
|
| 95 | ||
| @@ 155-166 (lines=12) @@ | ||
| 152 | return new Link ($href, $this->getMimeType (), Link::OPDS_ACQUISITION_TYPE, $title); |
|
| 153 | } |
|
| 154 | ||
| 155 | public static function getDataByBook ($book) { |
|
| 156 | $out = array (); |
|
| 157 | $result = parent::getDb ()->prepare('select id, format, name |
|
| 158 | from data where book = ?'); |
|
| 159 | $result->execute (array ($book->id)); |
|
| 160 | ||
| 161 | while ($post = $result->fetchObject ()) |
|
| 162 | { |
|
| 163 | array_push ($out, new Data ($post, $book)); |
|
| 164 | } |
|
| 165 | return $out; |
|
| 166 | } |
|
| 167 | ||
| 168 | public static function handleThumbnailLink ($urlParam, $height) { |
|
| 169 | global $config; |
|