diff --git a/web/skins/classic/includes/export_functions.php b/web/skins/classic/includes/export_functions.php index 0e348152f..f34d53546 100644 --- a/web/skins/classic/includes/export_functions.php +++ b/web/skins/classic/includes/export_functions.php @@ -786,7 +786,7 @@ function exportFileList( } closedir($dir); } - ZM\Debug(print_r($files, true)); + ZM\Debug('All available files: '.print_r($files, true)); $exportFileList = array(); @@ -843,6 +843,18 @@ function exportFileList( ZM\Debug('Not including frame images'); } # end if exportImages + if ($exportVideo) { + $filesLeft = array(); + foreach ($files as $file) { + if (preg_match('/\.(?:mpg|mpeg|mov|swf|mp4|mkv|avi|asf|3gp)$/', $file)) { + $exportFileList[$file] = $file; + } else { + $filesLeft[$file] = $file; + } + } + $files = $filesLeft; + } + if ($exportMisc) { foreach ($files as $file) { $exportFileList[$file] = $file;