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:
@@ -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
|
||||
*
|
||||
|
Reference in New Issue
Block a user