Refactor the use of fetch.php to prepare multi database. re #40

This commit is contained in:
Sébastien Lucas 2013-04-03 20:59:53 +02:00
parent d86d544074
commit f5d86b37e5
2 changed files with 18 additions and 16 deletions

View file

@ -329,15 +329,8 @@ class Book extends Base {
if ($this->hasCover)
{
array_push ($linkArray, Data::getLink ($this, "jpg", "image/jpeg", Link::OPDS_IMAGE_TYPE, "cover.jpg", NULL));
$height = "50";
if (preg_match ('/feed.php/', $_SERVER["SCRIPT_NAME"])) {
$height = $config['cops_opds_thumbnail_height'];
}
else
{
$height = $config['cops_html_thumbnail_height'];
}
array_push ($linkArray, new Link ("fetch.php?id=$this->id&height=" . $height, "image/jpeg", Link::OPDS_THUMBNAIL_TYPE));
array_push ($linkArray, Data::getLink ($this, "jpg", "image/jpeg", Link::OPDS_THUMBNAIL_TYPE, "cover.jpg", NULL));
}
foreach ($this->getDatas () as $data)