Skip to content

Commit

Permalink
[FINNA-2794] Fix kirjavalitys covers to use institution id. (NatLibFi…
Browse files Browse the repository at this point in the history
  • Loading branch information
LuomaJuha authored Nov 8, 2024
1 parent e60378c commit b4edb81
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion module/Finna/src/Finna/Content/Covers/Kirjavalitys.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ public function __construct(\VuFind\Record\Loader $recordLoader)
*/
public function getUrl($key, $size, $ids)
{
if (!$key) {
return false;
}
$sizeCodes = [
'medium' => 'max400',
'small' => 'max200',
Expand Down Expand Up @@ -105,7 +108,7 @@ public function getUrl($key, $size, $ids)
'format' => 'image',
'size' => $sizeCodes[$size] ?? 'max400',
];
return 'https://media.kirjavalitys.fi/library/cover/helmet/' . rawurlencode($pid)
return 'https://media.kirjavalitys.fi/library/cover/' . rawurlencode($key) . '/' . rawurlencode($pid)
. '?' . http_build_query($params);
}
return false;
Expand Down

0 comments on commit b4edb81

Please sign in to comment.