1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 00:07:44 +02:00

some tiny changes...

git-svn-id: file:///svn/phpbb/trunk@5967 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-05-26 15:04:27 +00:00
parent 8dc9fc089b
commit 9fca29eae3
33 changed files with 193 additions and 101 deletions

View File

@@ -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;
}
}