aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_upload.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-12-27 12:18:04 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-12-27 12:18:04 +0000
commit25725c98503c3a9ba8b5de4b91c2528b6c974a03 (patch)
treeadf5470b0a4f90ef44b9be7a9761c4a6153072aa /phpBB/includes/functions_upload.php
parent297af28a40e5fa94de0cb2f57d807b39020f44f0 (diff)
downloadforums-25725c98503c3a9ba8b5de4b91c2528b6c974a03.tar
forums-25725c98503c3a9ba8b5de4b91c2528b6c974a03.tar.gz
forums-25725c98503c3a9ba8b5de4b91c2528b6c974a03.tar.bz2
forums-25725c98503c3a9ba8b5de4b91c2528b6c974a03.tar.xz
forums-25725c98503c3a9ba8b5de4b91c2528b6c974a03.zip
replace constants with class constants.
ACL_YES, ACL_NO, ACL_NEVER, USER_NORMAL, USER_IGNORE, USER_INACTIVE, USER_FOUNDER git-svn-id: file:///svn/phpbb/trunk@9233 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_upload.php')
-rw-r--r--phpBB/includes/functions_upload.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php
index c79c0808af..dc2f399dcd 100644
--- a/phpBB/includes/functions_upload.php
+++ b/phpBB/includes/functions_upload.php
@@ -121,9 +121,9 @@ class filespec
case 'avatar':
$this->extension = strtolower($this->extension);
$this->realname = $prefix . $user_id . '.' . $this->extension;
-
+
break;
-
+
case 'unique_ext':
default:
$this->realname = $prefix . md5(unique_id()) . '.' . $this->extension;
@@ -228,8 +228,8 @@ class filespec
{
return @filesize($filename);
}
-
-
+
+
/**
* Check the first 256 bytes for forbidden content
*/
@@ -239,7 +239,7 @@ class filespec
{
return true;
}
-
+
$fp = @fopen($this->filename, 'rb');
if ($fp !== false)
@@ -276,7 +276,7 @@ class filespec
return false;
}
- $chmod = ($chmod === false) ? CHMOD_READ | CHMOD_WRITE : $chmod;
+ $chmod = ($chmod === false) ? phpbb::CHMOD_READ | phpbb::CHMOD_WRITE : $chmod;
// We need to trust the admin in specifying valid upload directories and an attacker not being able to overwrite it...
$this->destination_path = PHPBB_ROOT_PATH . $destination;
@@ -419,7 +419,7 @@ class filespec
{
$size_lang = ($this->upload->max_filesize >= 1048576) ? $user->lang['MIB'] : (($this->upload->max_filesize >= 1024) ? $user->lang['KIB'] : $user->lang['BYTES'] );
$max_filesize = get_formatted_filesize($this->upload->max_filesize, false);
-
+
$this->error[] = sprintf($user->lang[$this->upload->error_prefix . 'WRONG_FILESIZE'], $max_filesize, $size_lang);
return false;
@@ -531,7 +531,7 @@ class fileupload
$this->max_filesize = (int) $max_filesize;
}
}
-
+
/**
* Set disallowed strings
*/
@@ -875,7 +875,7 @@ class fileupload
{
$file->error[] = sprintf($user->lang[$this->error_prefix . 'DISALLOWED_EXTENSION'], $file->get('extension'));
}
-
+
// MIME Sniffing
if (!$this->valid_content($file))
{