mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-24 15:49:06 +01:00
Another spell-check and wrapper added
This commit is contained in:
parent
6d5de5038e
commit
eaad270825
@ -252,11 +252,11 @@
|
||||
// Echo content headers for file downloads
|
||||
function content_header($fn='',$mime='',$length='',$nocache=True)
|
||||
{
|
||||
// if no mine-type is given or it's the default binary-type, guess it from the extension
|
||||
// if no mime-type is given or it's the default binary-type, guess it from the extension
|
||||
if(empty($mime) || $mime == 'application/octet-stream')
|
||||
{
|
||||
$mime_magic = createObject('phpgwapi.mime_magic');
|
||||
$mime = $mime_magic->filename2mine($fn);
|
||||
$mime = $mime_magic->filename2mime($fn);
|
||||
}
|
||||
if($fn)
|
||||
{
|
||||
|
@ -87,7 +87,7 @@
|
||||
|
||||
/**
|
||||
* Attempt to convert a filename to a MIME type, based on the
|
||||
* global Horde and application specific config files.
|
||||
* global and application specific config files.
|
||||
*
|
||||
* Unlike ext2mime, this function will return
|
||||
* 'application/octet-stream' for any unknown or empty extension
|
||||
@ -99,7 +99,7 @@
|
||||
* @return string The MIME type of the filename.
|
||||
* @author skwashd - changed it to make it work with file.tar.gz etc
|
||||
*/
|
||||
function filename2mine($filename)
|
||||
function filename2mime($filename)
|
||||
{
|
||||
$fn_parts = explode('.', $filename);
|
||||
if (is_array($fn_parts))
|
||||
@ -108,6 +108,12 @@
|
||||
}
|
||||
return 'application/octet-stream';
|
||||
}
|
||||
|
||||
/* temporary fix for apps using the old name */
|
||||
function filename2mine($filename)
|
||||
{
|
||||
return $this->filename2mime($filename);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to convert a MIME type to a file extension, based
|
||||
|
Loading…
Reference in New Issue
Block a user