From 9fca29eae3051730b72f6144e2683cd2fe7c8d0b Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Fri, 26 May 2006 15:04:27 +0000 Subject: some tiny changes... git-svn-id: file:///svn/phpbb/trunk@5967 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_upload.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'phpBB/includes/functions_upload.php') 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; } } -- cgit v1.2.1