diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-05-26 15:04:27 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-05-26 15:04:27 +0000 |
commit | 9fca29eae3051730b72f6144e2683cd2fe7c8d0b (patch) | |
tree | 247a6d85513aecc010d34dec73e80d0996f4df05 /phpBB/includes/functions_upload.php | |
parent | 8dc9fc089bf3a45bd5f23986d5c9f4992196834f (diff) | |
download | forums-9fca29eae3051730b72f6144e2683cd2fe7c8d0b.tar forums-9fca29eae3051730b72f6144e2683cd2fe7c8d0b.tar.gz forums-9fca29eae3051730b72f6144e2683cd2fe7c8d0b.tar.bz2 forums-9fca29eae3051730b72f6144e2683cd2fe7c8d0b.tar.xz forums-9fca29eae3051730b72f6144e2683cd2fe7c8d0b.zip |
some tiny changes...
git-svn-id: file:///svn/phpbb/trunk@5967 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_upload.php')
-rw-r--r-- | phpBB/includes/functions_upload.php | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php index 8b59cfa5c7..678ca2b493 100644 --- a/phpBB/includes/functions_upload.php +++ b/phpBB/includes/functions_upload.php @@ -114,16 +114,11 @@ class filespec function get($property) { - if ($this->init_error) - { - return; - } - - if (!isset($this->$property)) + if ($this->init_error || !isset($this->$property)) { return false; } - + return $this->$property; } @@ -284,6 +279,8 @@ class filespec $this->file_moved = true; $this->additional_checks(); unset($this->upload); + + return true; } function additional_checks() @@ -302,13 +299,18 @@ class filespec $max_filesize = ($this->upload->max_filesize >= 1048576) ? round($this->upload->max_filesize / 1048576 * 100) / 100 : (($this->upload->max_filesize >= 1024) ? round($this->upload->max_filesize / 1024 * 100) / 100 : $this->upload->max_filesize); $this->error[] = sprintf($user->lang[$this->upload->error_prefix . 'WRONG_FILESIZE'], $max_filesize, $size_lang); - return; + + return false; } if (!$this->upload->valid_dimensions($this)) { $this->error[] = sprintf($user->lang[$this->upload->error_prefix . 'WRONG_SIZE'], $this->upload->min_width, $this->upload->min_height, $this->upload->max_width, $this->upload->max_height, $this->width, $this->height); + + return false; } + + return true; } } |