Skip to content

Commit

Permalink
Added comment
Browse files Browse the repository at this point in the history
  • Loading branch information
LuomaJuha committed Sep 20, 2024
1 parent 78ec5e4 commit 05affcf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions module/Finna/src/Finna/RecordDriver/SolrMarc.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ public function getAllImages($language = 'fi', $includePdf = true)
$type = $this->getSubfield($url, 'q');
$image = 'image/jpeg' === $type || strcasecmp('image', $type) === 0;
$pdf = 'application/pdf' === $type || preg_match('/\.pdf$/i', $address);
// Check second indicator for exact presentation of the resource.
// Ignore for images etc. since they can use value '2' e.g. to represent just the cover.
if ($pdf && !in_array($url['i2'], [' ', '0'])) {
continue;
}
Expand Down

0 comments on commit 05affcf

Please sign in to comment.