From 760eb2af1a3a73d50a7905fc0094807c4ee7a7e4 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 9 Jul 2007 13:29:09 +0000 Subject: [PATCH] windows seems to use applicaton/msword for rtf-documents, instead of application/rtf, we now list files with both mime type, if the extension is .rtf --- addressbook/inc/class.uicontacts.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addressbook/inc/class.uicontacts.inc.php b/addressbook/inc/class.uicontacts.inc.php index 7dabb6c948..da0a13fe4b 100644 --- a/addressbook/inc/class.uicontacts.inc.php +++ b/addressbook/inc/class.uicontacts.inc.php @@ -1909,7 +1909,9 @@ $readonlys['button[vcard]'] = true; foreach($files as $file) { // return only the mime-types we support - if ($file['mime_type'] != 'application/rtf' && substr($file['mime_type'],0,5) != 'text/') continue; + if (!($file['mime_type'] == 'application/rtf' || + $file['mime_type'] == 'application/msword' && !strcasecmp(substr($file['name'],-4),'.rtf') || + substr($file['mime_type'],0,5) == 'text/')) continue; // As browsers not always return the right mime_type, you could use a negative list instead //if ($file['mime_type'] == 'Directory' || substr($file['mime_type'],0,6) == 'image/') continue;