aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_upload.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-04-17 13:09:50 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-04-17 13:09:50 +0000
commita0f8e1323a0fb50e6a4b7449f93b493377eddd2c (patch)
treead60ba619c483e390bf767c70ff7c160e087daf5 /phpBB/includes/functions_upload.php
parent8c2f02ca00b41d7aa3282aaacfbf2674a5347a14 (diff)
downloadforums-a0f8e1323a0fb50e6a4b7449f93b493377eddd2c.tar
forums-a0f8e1323a0fb50e6a4b7449f93b493377eddd2c.tar.gz
forums-a0f8e1323a0fb50e6a4b7449f93b493377eddd2c.tar.bz2
forums-a0f8e1323a0fb50e6a4b7449f93b493377eddd2c.tar.xz
forums-a0f8e1323a0fb50e6a4b7449f93b493377eddd2c.zip
- clean up marklist calls (global function)
- added new feature: test out others permissions (admin permissions will not be copied) - changed attachment processing by directly using the template engine - fixed some attachment related bugs - additional tiny fixes git-svn-id: file:///svn/phpbb/trunk@5790 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_upload.php')
-rw-r--r--phpBB/includes/functions_upload.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php
index a9e08ec1e9..46449ff722 100644
--- a/phpBB/includes/functions_upload.php
+++ b/phpBB/includes/functions_upload.php
@@ -165,6 +165,39 @@ class filespec
}
/**
+ * Get mimetype
+ */
+ function get_mimetype($filename)
+ {
+ if (function_exists('mime_content_type'))
+ {
+ $mimetype = mime_content_type($filename);
+ }
+ else
+ {
+ $mimetype = 'application/octetstream';
+ }
+
+ // Opera adds the name to the mime type
+ $mimetype = (strpos($mimetype, '; name') !== false) ? str_replace(strstr($mimetype, '; name'), '', $mimetype) : $mimetype;
+
+ if (!$mimetype)
+ {
+ $mimetype = 'application/octetstream';
+ }
+
+ return $mimetype;
+ }
+
+ /**
+ * Get filesize
+ */
+ function get_filesize($filename)
+ {
+ return @filesize($filename);
+ }
+
+ /**
* Move file to destination folder
*
* The phpbb_root_path variable will be applied to the destination path