From a896587970450b289ee99191265b076d82e5c165 Mon Sep 17 00:00:00 2001 From: z0rglub Date: Sun, 3 Oct 2004 10:20:57 +0000 Subject: bug 40 : case issue for uploaded pictures git-svn-id: http://piwigo.org/svn/branches/release-1_3@544 68402e56-0260-453c-a942-63ccdbb3a9ee --- upload.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upload.php b/upload.php index 68bfae66b..986b388cc 100644 --- a/upload.php +++ b/upload.php @@ -30,13 +30,13 @@ function validate_upload( $temp_name, $my_max_file_size, $image_max_width, $image_max_height ) { - global $lang; + global $conf, $lang; $result = array(); $result['error'] = array(); //echo $_FILES['picture']['name']."
".$temp_name; $extension = get_extension( $_FILES['picture']['name'] ); - if ( $extension != 'gif' and $extension != 'jpg' and $extension != 'png' ) + if ( in_array( $extension, $conf['picture_ext'] ) { array_push( $result['error'], $lang['upload_advise_filetype'] ); return $result; -- cgit v1.2.3