@@ -152,6 +152,9 @@ discard block |
||
152 | 152 | return new Link ($href, $this->getMimeType (), Link::OPDS_ACQUISITION_TYPE, $title); |
153 | 153 | } |
154 | 154 | |
155 | + /** |
|
156 | + * @param Book $book |
|
157 | + */ |
|
155 | 158 | public static function getDataByBook ($book) { |
156 | 159 | $out = array (); |
157 | 160 | $result = parent::getDb ()->prepare('select id, format, name |
@@ -165,6 +168,9 @@ discard block |
||
165 | 168 | return $out; |
166 | 169 | } |
167 | 170 | |
171 | + /** |
|
172 | + * @param string $urlParam |
|
173 | + */ |
|
168 | 174 | public static function handleThumbnailLink ($urlParam, $height) { |
169 | 175 | global $config; |
170 | 176 | |
@@ -184,6 +190,10 @@ discard block |
||
184 | 190 | return $urlParam; |
185 | 191 | } |
186 | 192 | |
193 | + /** |
|
194 | + * @param string $type |
|
195 | + * @param string $filename |
|
196 | + */ |
|
187 | 197 | public static function getLink ($book, $type, $mime, $rel, $filename, $idData, $title = NULL, $height = NULL, $view = false) |
188 | 198 | { |
189 | 199 | global $config; |
@@ -105,7 +105,7 @@ |
||
105 | 105 | public function getUpdatedFilenameKepub () { |
106 | 106 | $str = $this->getUpdatedFilename () . ".kepub.epub"; |
107 | 107 | return str_replace(array(':', '#', '&'), |
108 | - array('-', '-', ' '), $str ); |
|
108 | + array('-', '-', ' '), $str ); |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | public function getDataLink ($rel, $title = NULL, $view = false) { |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | if ($data = $book->getDataFormat ($format)) { |
25 | 25 | $i++; |
26 | 26 | array_push ($preferedData, array ("url" => $data->getHtmlLink (), |
27 | - "viewUrl" => $data->getViewHtmlLink (), "name" => $format)); |
|
27 | + "viewUrl" => $data->getViewHtmlLink (), "name" => $format)); |
|
28 | 28 | } |
29 | 29 | } |
30 | 30 | |
@@ -52,20 +52,20 @@ discard block |
||
52 | 52 | $cc = $book->getCustomColumnValues($config['cops_calibre_custom_column_list'], true); |
53 | 53 | |
54 | 54 | return array ("id" => $book->id, |
55 | - "hasCover" => $book->hasCover, |
|
56 | - "preferedData" => $preferedData, |
|
57 | - "rating" => $book->getRating (), |
|
58 | - "publisherName" => $pn, |
|
59 | - "publisherurl" => $pu, |
|
60 | - "pubDate" => $book->getPubDate (), |
|
61 | - "languagesName" => $book->getLanguages (), |
|
62 | - "authorsName" => $book->getAuthorsName (), |
|
63 | - "tagsName" => $book->getTagsName (), |
|
64 | - "seriesName" => $sn, |
|
65 | - "seriesIndex" => $book->seriesIndex, |
|
66 | - "seriesCompleteName" => $scn, |
|
67 | - "seriesurl" => $su, |
|
68 | - "customcolumns_list" => $cc); |
|
55 | + "hasCover" => $book->hasCover, |
|
56 | + "preferedData" => $preferedData, |
|
57 | + "rating" => $book->getRating (), |
|
58 | + "publisherName" => $pn, |
|
59 | + "publisherurl" => $pu, |
|
60 | + "pubDate" => $book->getPubDate (), |
|
61 | + "languagesName" => $book->getLanguages (), |
|
62 | + "authorsName" => $book->getAuthorsName (), |
|
63 | + "tagsName" => $book->getTagsName (), |
|
64 | + "seriesName" => $sn, |
|
65 | + "seriesIndex" => $book->seriesIndex, |
|
66 | + "seriesCompleteName" => $scn, |
|
67 | + "seriesurl" => $su, |
|
68 | + "customcolumns_list" => $cc); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
@@ -137,44 +137,44 @@ discard block |
||
137 | 137 | $out = $in; |
138 | 138 | |
139 | 139 | $out ["c"] = array ("version" => VERSION, "i18n" => array ( |
140 | - "coverAlt" => localize("i18n.coversection"), |
|
141 | - "authorsTitle" => localize("authors.title"), |
|
142 | - "bookwordTitle" => localize("bookword.title"), |
|
143 | - "tagsTitle" => localize("tags.title"), |
|
144 | - "seriesTitle" => localize("series.title"), |
|
145 | - "customizeTitle" => localize ("customize.title"), |
|
146 | - "aboutTitle" => localize ("about.title"), |
|
147 | - "previousAlt" => localize ("paging.previous.alternate"), |
|
148 | - "nextAlt" => localize ("paging.next.alternate"), |
|
149 | - "searchAlt" => localize ("search.alternate"), |
|
150 | - "sortAlt" => localize ("sort.alternate"), |
|
151 | - "homeAlt" => localize ("home.alternate"), |
|
152 | - "cogAlt" => localize ("cog.alternate"), |
|
153 | - "permalinkAlt" => localize ("permalink.alternate"), |
|
154 | - "publisherName" => localize("publisher.name"), |
|
155 | - "pubdateTitle" => localize("pubdate.title"), |
|
156 | - "languagesTitle" => localize("language.title"), |
|
157 | - "contentTitle" => localize("content.summary"), |
|
158 | - "sortorderAsc" => localize("search.sortorder.asc"), |
|
159 | - "sortorderDesc" => localize("search.sortorder.desc"), |
|
160 | - "customizeEmail" => localize("customize.email")), |
|
161 | - "url" => array ( |
|
162 | - "detailUrl" => "index.php?page=13&id={0}&db={1}", |
|
163 | - "coverUrl" => "fetch.php?id={0}&db={1}", |
|
164 | - "thumbnailUrl" => "fetch.php?height=" . $config['cops_html_thumbnail_height'] . "&id={0}&db={1}"), |
|
165 | - "config" => array ( |
|
166 | - "use_fancyapps" => $config ["cops_use_fancyapps"], |
|
167 | - "max_item_per_page" => $config['cops_max_item_per_page'], |
|
168 | - "kindleHack" => "", |
|
169 | - "server_side_rendering" => useServerSideRendering (), |
|
170 | - "html_tag_filter" => $config['cops_html_tag_filter'])); |
|
140 | + "coverAlt" => localize("i18n.coversection"), |
|
141 | + "authorsTitle" => localize("authors.title"), |
|
142 | + "bookwordTitle" => localize("bookword.title"), |
|
143 | + "tagsTitle" => localize("tags.title"), |
|
144 | + "seriesTitle" => localize("series.title"), |
|
145 | + "customizeTitle" => localize ("customize.title"), |
|
146 | + "aboutTitle" => localize ("about.title"), |
|
147 | + "previousAlt" => localize ("paging.previous.alternate"), |
|
148 | + "nextAlt" => localize ("paging.next.alternate"), |
|
149 | + "searchAlt" => localize ("search.alternate"), |
|
150 | + "sortAlt" => localize ("sort.alternate"), |
|
151 | + "homeAlt" => localize ("home.alternate"), |
|
152 | + "cogAlt" => localize ("cog.alternate"), |
|
153 | + "permalinkAlt" => localize ("permalink.alternate"), |
|
154 | + "publisherName" => localize("publisher.name"), |
|
155 | + "pubdateTitle" => localize("pubdate.title"), |
|
156 | + "languagesTitle" => localize("language.title"), |
|
157 | + "contentTitle" => localize("content.summary"), |
|
158 | + "sortorderAsc" => localize("search.sortorder.asc"), |
|
159 | + "sortorderDesc" => localize("search.sortorder.desc"), |
|
160 | + "customizeEmail" => localize("customize.email")), |
|
161 | + "url" => array ( |
|
162 | + "detailUrl" => "index.php?page=13&id={0}&db={1}", |
|
163 | + "coverUrl" => "fetch.php?id={0}&db={1}", |
|
164 | + "thumbnailUrl" => "fetch.php?height=" . $config['cops_html_thumbnail_height'] . "&id={0}&db={1}"), |
|
165 | + "config" => array ( |
|
166 | + "use_fancyapps" => $config ["cops_use_fancyapps"], |
|
167 | + "max_item_per_page" => $config['cops_max_item_per_page'], |
|
168 | + "kindleHack" => "", |
|
169 | + "server_side_rendering" => useServerSideRendering (), |
|
170 | + "html_tag_filter" => $config['cops_html_tag_filter'])); |
|
171 | 171 | if ($config['cops_thumbnail_handling'] == "1") { |
172 | 172 | $out ["c"]["url"]["thumbnailUrl"] = $out ["c"]["url"]["coverUrl"]; |
173 | 173 | } else if (!empty ($config['cops_thumbnail_handling'])) { |
174 | 174 | $out ["c"]["url"]["thumbnailUrl"] = $config['cops_thumbnail_handling']; |
175 | 175 | } |
176 | 176 | if (preg_match("/./", $_SERVER['HTTP_USER_AGENT'])) { |
177 | - $out ["c"]["config"]["kindleHack"] = 'style="text-decoration: none !important;"'; |
|
177 | + $out ["c"]["config"]["kindleHack"] = 'style="text-decoration: none !important;"'; |
|
178 | 178 | } |
179 | 179 | return $out; |
180 | 180 | } |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | } |
234 | 234 | if (!is_null (getURLParam ("complete")) || $complete) { |
235 | 235 | $out = self::addCompleteArray ($out); |
236 | - } |
|
236 | + } |
|
237 | 237 | |
238 | 238 | $out ["containsBook"] = 0; |
239 | 239 | if ($currentPage->containsBook ()) { |