diff --git a/module/Finna/src/Finna/RecordDriver/SolrQdc.php b/module/Finna/src/Finna/RecordDriver/SolrQdc.php index 46c5d3248e4..82d99ce9efe 100644 --- a/module/Finna/src/Finna/RecordDriver/SolrQdc.php +++ b/module/Finna/src/Finna/RecordDriver/SolrQdc.php @@ -300,13 +300,12 @@ public function getAllImages($language = 'fi', $includePdf = true) if ((string)$attributes->bundle !== 'ORIGINAL') { continue; } - $mediaTypes = ['application/pdf']; $url = isset($attributes->href) ? (string)$attributes->href : (string)$node; $type = trim((string)$attributes->type); if ( - ($type && !in_array($attributes->type, $mediaTypes)) - || (!$type && !preg_match('/\.(pdf)$/i', $url)) + ($type && $type !== 'application/pdf') + || (!$type && !preg_match('/\.pdf$/i', $url)) ) { continue; }