diff options
author | z0rglub <z0rglub@piwigo.org> | 2004-10-25 20:35:35 +0000 |
---|---|---|
committer | z0rglub <z0rglub@piwigo.org> | 2004-10-25 20:35:35 +0000 |
commit | 54bfd62e17da720c3dd0b0d27a0c799396623307 (patch) | |
tree | b3e6c103afd954bdfdf001474eb0d6d79fc1d4a1 /upload.php | |
parent | 691a834cd35825e518f5bdb92bc9bd3eebdf9c5e (diff) |
- bug 56 : wrong error message for exceeding filesize picture
- bug 40 : case issue for uploaded pictures
git-svn-id: http://piwigo.org/svn/trunk@585 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'upload.php')
-rw-r--r-- | upload.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/upload.php b/upload.php index aa9dca431..61081777c 100644 --- a/upload.php +++ b/upload.php @@ -40,13 +40,13 @@ include_once( PHPWG_ROOT_PATH.'include/common.inc.php' ); 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']."<br />".$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; @@ -59,7 +59,7 @@ function validate_upload( $temp_name, $my_max_file_size, else if ( $_FILES['picture']['size'] > $my_max_file_size * 1024 ) { array_push( $result['error'], - $lang['upload_advise_width'].$my_max_file_size.' KB' ); + $lang['upload_advise_filesize'].$my_max_file_size.' KB' ); } else { |