diff options
author | plegall <plg@piwigo.org> | 2014-07-30 13:48:35 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2014-07-30 13:48:35 +0000 |
commit | 379398d91751ca7394cd7c24ace3f7767fa1e5dd (patch) | |
tree | 6c5be81f008da844aa514a06143d9f58b9aaa73b /admin/include/photos_add_direct_prepare.inc.php | |
parent | cd110d959b6f6381a250e876f2b6f5c36705274c (diff) |
feature 3067: upload any file type with the new HTML5 upload form.
$file_types = conf['upload_form_all_types'] ? $conf['file_ext'] : $conf['picture_ext'];
By default, conf['upload_form_all_types'] = false;
git-svn-id: http://piwigo.org/svn/trunk@29124 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/include/photos_add_direct_prepare.inc.php')
-rw-r--r-- | admin/include/photos_add_direct_prepare.inc.php | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/admin/include/photos_add_direct_prepare.inc.php b/admin/include/photos_add_direct_prepare.inc.php index c917d12bd..34b025f13 100644 --- a/admin/include/photos_add_direct_prepare.inc.php +++ b/admin/include/photos_add_direct_prepare.inc.php @@ -93,21 +93,17 @@ $template->assign( ) ); -$upload_file_types = 'jpeg, png, gif'; - -if (pwg_image::get_library() == 'ext_imagick') -{ - $upload_file_types.= ', tiff'; - $template->assign('tif_enabled', true); -} +$unique_exts = array_unique( + array_map( + 'strtolower', + $conf['upload_form_all_types'] ? $conf['file_ext'] : $conf['picture_ext'] + ) + ); -if (false) // TODO manage zip files in pwg.images.upload -{ - $upload_file_types.= ', zip'; -} $template->assign( array( - 'upload_file_types' => $upload_file_types, + 'upload_file_types' => implode(', ', $unique_exts), + 'file_exts' => implode(',', $unique_exts), ) ); |