Refactor again. re #40
This commit is contained in:
parent
f5d86b37e5
commit
91cf377d95
2 changed files with 12 additions and 9 deletions
17
data.php
17
data.php
|
@ -107,7 +107,7 @@ class Data extends Base {
|
|||
}
|
||||
}
|
||||
|
||||
public static function getLink ($book, $type, $mime, $rel, $filename, $idData, $title = NULL)
|
||||
public static function getLink ($book, $type, $mime, $rel, $filename, $idData, $title = NULL, $height = NULL)
|
||||
{
|
||||
global $config;
|
||||
|
||||
|
@ -120,13 +120,14 @@ class Data extends Base {
|
|||
{
|
||||
if ($type != "jpg") $urlParam = addURLParameter($urlParam, "type", $type);
|
||||
if ($rel == Link::OPDS_THUMBNAIL_TYPE) {
|
||||
$height = "50";
|
||||
if (preg_match ('/feed.php/', $_SERVER["SCRIPT_NAME"])) {
|
||||
$height = $config['cops_opds_thumbnail_height'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$height = $config['cops_html_thumbnail_height'];
|
||||
if (is_null ($height)) {
|
||||
if (preg_match ('/feed.php/', $_SERVER["SCRIPT_NAME"])) {
|
||||
$height = $config['cops_opds_thumbnail_height'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$height = $config['cops_html_thumbnail_height'];
|
||||
}
|
||||
}
|
||||
$urlParam = addURLParameter($urlParam, "height", $height);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue