1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-27 20:10:18 +02:00

- 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
This commit is contained in:
Meik Sievertsen
2006-04-17 13:09:50 +00:00
parent 8c2f02ca00
commit a0f8e1323a
49 changed files with 664 additions and 411 deletions

View File

@@ -164,6 +164,39 @@ class filespec
return array_pop($filename);
}
/**
* 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
*