diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-10-05 14:30:11 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-10-05 14:30:11 +0000 |
commit | e6c79242e6a7debfccc643a09dfab4a4d7746a8a (patch) | |
tree | 359aff16844a95c92252eae7879ab0b6f93cd76b /phpBB/includes/functions_upload.php | |
parent | 50a8caee5daa1caf1596e847b5708cba11e8ac83 (diff) | |
download | forums-e6c79242e6a7debfccc643a09dfab4a4d7746a8a.tar forums-e6c79242e6a7debfccc643a09dfab4a4d7746a8a.tar.gz forums-e6c79242e6a7debfccc643a09dfab4a4d7746a8a.tar.bz2 forums-e6c79242e6a7debfccc643a09dfab4a4d7746a8a.tar.xz forums-e6c79242e6a7debfccc643a09dfab4a4d7746a8a.zip |
dumdidum... sorry. ;)
git-svn-id: file:///svn/phpbb/trunk@8146 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_upload.php')
-rw-r--r-- | phpBB/includes/functions_upload.php | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php index d3110869af..8e4bb6284a 100644 --- a/phpBB/includes/functions_upload.php +++ b/phpBB/includes/functions_upload.php @@ -1,14 +1,22 @@ <?php -/** +/** * * @package phpBB3 -* @version $Id$ -* @copyright (c) 2005 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License * */ /** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +/** * Responsible for holding all file relevant information, as well as doing file-specific operations. * The {@link fileupload fileupload class} can be used to upload several files, each of them being this object to operate further on. * @package phpBB3 @@ -76,7 +84,7 @@ class filespec /** * Cleans destination filename - * + * * @param real|unique|unique_ext $mode real creates a realname, filtering some characters, lowering every character. Unique creates an unique filename * @param string $prefix Prefix applied to filename * @access public @@ -269,9 +277,9 @@ class filespec { case 'copy': - if (!@copy($this->filename, $this->destination_file)) + if (!@copy($this->filename, $this->destination_file)) { - if (!@move_uploaded_file($this->filename, $this->destination_file)) + if (!@move_uploaded_file($this->filename, $this->destination_file)) { $this->error[] = sprintf($user->lang[$this->upload->error_prefix . 'GENERAL_UPLOAD_ERROR'], $this->destination_file); return false; @@ -284,9 +292,9 @@ class filespec case 'move': - if (!@move_uploaded_file($this->filename, $this->destination_file)) + if (!@move_uploaded_file($this->filename, $this->destination_file)) { - if (!@copy($this->filename, $this->destination_file)) + if (!@copy($this->filename, $this->destination_file)) { $this->error[] = sprintf($user->lang[$this->upload->error_prefix . 'GENERAL_UPLOAD_ERROR'], $this->destination_file); return false; @@ -299,7 +307,7 @@ class filespec case 'local': - if (!@copy($this->filename, $this->destination_file)) + if (!@copy($this->filename, $this->destination_file)) { $this->error[] = sprintf($user->lang[$this->upload->error_prefix . 'GENERAL_UPLOAD_ERROR'], $this->destination_file); return false; @@ -653,7 +661,7 @@ class fileupload $file = new fileerror($user->lang[$this->error_prefix . 'URL_INVALID']); return $file; } - + if (empty($match[2])) { $file = new fileerror($user->lang[$this->error_prefix . 'URL_INVALID']); @@ -813,7 +821,7 @@ class fileupload // check Filename if (preg_match("#[\\/:*?\"<>|]#i", $file->get('realname'))) - { + { $file->error[] = sprintf($user->lang[$this->error_prefix . 'INVALID_FILENAME'], $file->get('realname')); } @@ -842,8 +850,8 @@ class fileupload return true; } - if (($file->get('width') > $this->max_width && $this->max_width) || - ($file->get('height') > $this->max_height && $this->max_height) || + if (($file->get('width') > $this->max_width && $this->max_width) || + ($file->get('height') > $this->max_height && $this->max_height) || ($file->get('width') < $this->min_width && $this->min_width) || ($file->get('height') < $this->min_height && $this->min_height)) { @@ -862,7 +870,7 @@ class fileupload } /** - * Return image type/extension mapping + * Return image type/extension mapping */ function image_types() { |