mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
Correct way to check file type
This commit is contained in:
committed by
Pierrick Le Gall
parent
cdd4d3d2b3
commit
eeef623780
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user