From eaad27082531ee7a23ff170f6add4b9ddfc45029 Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Sun, 28 Dec 2003 14:54:17 +0000 Subject: [PATCH] Another spell-check and wrapper added --- phpgwapi/inc/class.browser.inc.php | 4 ++-- phpgwapi/inc/class.mime_magic.inc.php | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/phpgwapi/inc/class.browser.inc.php b/phpgwapi/inc/class.browser.inc.php index 6e836e0901..93e77d05f0 100644 --- a/phpgwapi/inc/class.browser.inc.php +++ b/phpgwapi/inc/class.browser.inc.php @@ -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) { diff --git a/phpgwapi/inc/class.mime_magic.inc.php b/phpgwapi/inc/class.mime_magic.inc.php index 02db59f0ad..4f31049af0 100644 --- a/phpgwapi/inc/class.mime_magic.inc.php +++ b/phpgwapi/inc/class.mime_magic.inc.php @@ -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