(cp eeef62378) Correct way to check file type

This commit is contained in:
plegall 2024-10-25 10:26:07 +02:00
parent fdefcffe0e
commit 34d0b3f788

View file

@ -971,7 +971,7 @@ SELECT id, name, permalink
}
}
if (str_ends_with(strtolower($picture['current']['file']), "pdf" )) {
if (in_array(strtolower(get_extension($picture['current']['file'])), array('pdf'))) {
$template->assign(
array(
'PDF_VIEWER_FILESIZE_THRESHOLD' => $conf['pdf_viewer_filesize_threshold']*1024,