From 7548d5c1e270b5b2854a20bcffb388786799c88f Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 16 May 2012 06:04:35 +0000 Subject: [PATCH] missing ms office 2007/10 mime types --- phpgwapi/inc/class.mime_magic.inc.php | 44 ++++++++++++++++++--------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/phpgwapi/inc/class.mime_magic.inc.php b/phpgwapi/inc/class.mime_magic.inc.php index 817ecba273..ac2f17807e 100644 --- a/phpgwapi/inc/class.mime_magic.inc.php +++ b/phpgwapi/inc/class.mime_magic.inc.php @@ -228,7 +228,7 @@ class mime_magic 'aif' => 'audio/x-aiff', 'aifc' => 'audio/x-aiff', 'aiff' => 'audio/x-aiff', - 'asc' => 'application/pgp', //changed by skwashd - was text/plain + 'asc' => 'application/pgp', // was text/plain 'asf' => 'video/x-ms-asf', 'asx' => 'video/x-ms-asf', 'au' => 'audio/basic', @@ -237,28 +237,30 @@ class mime_magic 'bin' => 'application/octet-stream', 'bmp' => 'image/bmp', 'txt' => 'text/plain', // ralfbecker: moving txt above all other text plain types, to get text/plain displayed as "TXT file" - 'c' => 'text/plain', // or 'text/x-csrc', //added by skwashd - 'c++' => 'text/plain', // or 'text/x-c++src', //added by skwashd - 'cc' => 'text/plain', // or 'text/x-c++src', //added by skwashd - 'cs' => 'text/plain', //added by skwashd - for C# src - 'cpp' => 'text/x-c++src', //added by skwashd - 'cxx' => 'text/x-c++src', //added by skwashd + 'c' => 'text/plain', // or 'text/x-csrc', + 'c++' => 'text/plain', // or 'text/x-c++src', + 'cc' => 'text/plain', // or 'text/x-c++src', + 'cs' => 'text/plain', // C# src + 'cpp' => 'text/x-c++src', + 'cxx' => 'text/x-c++src', 'cdf' => 'application/x-netcdf', 'class' => 'application/octet-stream',//secure but application/java-class is correct - 'com' => 'application/octet-stream',//added by skwashd + 'com' => 'application/octet-stream', 'cpio' => 'application/x-cpio', 'cpt' => 'application/mac-compactpro', 'csh' => 'application/x-csh', 'css' => 'text/css', - 'csv' => 'text/comma-separated-values',//added by skwashd + 'csv' => 'text/comma-separated-values', 'dcr' => 'application/x-director', 'diff' => 'text/diff', 'dir' => 'application/x-director', 'dll' => 'application/octet-stream', 'dms' => 'application/octet-stream', 'doc' => 'application/msword', + 'docm' => 'application/vnd.ms-word.document.macroEnabled.12', 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', // msword xml format - 'dot' => 'application/msword',//added by skwashd + 'dot' => 'application/msword', + 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.', 'dvi' => 'application/x-dvi', 'dxr' => 'application/x-director', 'eml' => 'message/rfc822', // thunderbird single mail export format @@ -285,8 +287,8 @@ class mime_magic 'ifb' => 'text/calendar', 'iges' => 'model/iges', 'igs' => 'model/iges', - 'jar' => 'application/x-jar', //added by skwashd - alternative mime type - 'java' => 'text/x-java-source', //added by skwashd + 'jar' => 'application/x-jar', // alternative mime type + 'java' => 'text/x-java-source', 'jpeg' => 'image/jpeg', 'jpg' => 'image/jpeg', 'jpe' => 'image/jpeg', @@ -327,7 +329,7 @@ class mime_magic 'pdf' => 'application/pdf', 'pgm' => 'image/x-portable-graymap', 'pgn' => 'application/x-chess-pgn', - 'pgp' => 'application/pgp',//added by skwashd + 'pgp' => 'application/pgp', 'php' => 'application/x-httpd-php', 'php3' => 'application/x-httpd-php3', 'pl' => 'application/x-perl', @@ -335,8 +337,15 @@ class mime_magic 'png' => 'image/png', 'pnm' => 'image/x-portable-anymap', 'po' => 'text/plain', + 'potm' => 'application/vnd.ms-powerpoint.template.macroEnabled.', + 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', + 'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12', 'ppm' => 'image/x-portable-pixmap', + 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12', + 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', 'ppt' => 'application/vnd.ms-powerpoint', + 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'ps' => 'application/postscript', 'qt' => 'video/quicktime', 'ra' => 'audio/x-realaudio', @@ -390,7 +399,7 @@ class mime_magic 'tr' => 'application/x-troff', 'tsv' => 'text/tab-separated-values', 'ustar' => 'application/x-ustar', - 'vbs' => 'text/plain', //added by skwashd - for obvious reasons + 'vbs' => 'text/plain', // for obvious reasons 'vcd' => 'application/x-cdlink', 'vcf' => 'text/vcard', 'vcs' => 'text/calendar', @@ -416,15 +425,20 @@ class mime_magic 'xbm' => 'image/x-xbitmap', 'xht' => 'application/xhtml+xml', 'xhtml' => 'application/xhtml+xml', + 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12', 'xls' => 'application/vnd.ms-excel', + 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', + 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12', 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', // excel xml format 'xlt' => 'application/vnd.ms-excel', + 'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12', + 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', 'xml' => 'application/xml', 'xpm' => 'image/x-xpixmap', 'xsl' => 'text/xml', 'xwd' => 'image/x-xwindowdump', 'xyz' => 'chemical/x-xyz', - 'z' => 'application/x-compress', + 'z' => 'application/x-compress', 'zip' => 'application/zip', ); /**