diff --git a/main/document/document_slideshow.inc.php b/main/document/document_slideshow.inc.php index 3394458722..2f4ab183c9 100644 --- a/main/document/document_slideshow.inc.php +++ b/main/document/document_slideshow.inc.php @@ -1,9 +1,9 @@ - 0) { } -// storing the extension of all the documents in an array -// and checking if there is a .jpg, .jpeg, .gif or .png file -// if this is the case a slideshow can be made. -$all_extensions=array(); $image_present=0; if ( count($all_files) > 0 ) @@ -98,7 +81,6 @@ if ( count($all_files) > 0 ) { $slideshow_extension=strrchr($file,"."); $slideshow_extension=strtolower($slideshow_extension); - $all_extensions[]=$slideshow_extension; if (in_array($slideshow_extension,$accepted_extensions)) { $image_present=1; @@ -127,6 +109,7 @@ function sort_files($table){ foreach($table as $file_array){ if($file_array['filetype']=='file'){ $slideshow_extension=strrchr($file_array['path'],"."); + $slideshow_extension=strtolower($slideshow_extension); if (in_array($slideshow_extension,$accepted_extensions)) { $temp[] = array('file', basename($file_array['path']), $file_array['size'], $file_array['insert_date']);