Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding correct Office 2007 mime types. MDL-15987

  • Loading branch information...
commit f81e0a1d064bd7e769edf8d8206e2d6764c50c5d 1 parent af4c52b
stronk7 authored
Showing with 23 additions and 16 deletions.
  1. +23 −16 lib/filelib.php
View
39 lib/filelib.php
@@ -331,10 +331,13 @@ function get_mimetypes_array() {
'csv' => array ('type'=>'text/csv', 'icon'=>'excel.gif'),
'dv' => array ('type'=>'video/x-dv', 'icon'=>'video.gif'),
'dmg' => array ('type'=>'application/octet-stream', 'icon'=>'dmg.gif'),
+
'doc' => array ('type'=>'application/msword', 'icon'=>'word.gif'),
- 'docx' => array ('type'=>'application/msword', 'icon'=>'docx.gif'),
- 'docm' => array ('type'=>'application/msword', 'icon'=>'docm.gif'),
- 'dotx' => array ('type'=>'application/msword', 'icon'=>'dotx.gif'),
+ 'docx' => array ('type'=>'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'icon'=>'docx.gif'),
+ 'docm' => array ('type'=>'application/vnd.ms-word.document.macroEnabled.12', 'icon'=>'docm.gif'),
+ 'dotx' => array ('type'=>'application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'icon'=>'dotx.gif'),
+ 'dotm' => array ('type'=>'application/vnd.ms-word.template.macroEnabled.12', 'icon'=>'dotm.gif'),
+
'dcr' => array ('type'=>'application/x-director', 'icon'=>'flash.gif'),
'dif' => array ('type'=>'video/x-dv', 'icon'=>'video.gif'),
'dir' => array ('type'=>'application/x-director', 'icon'=>'flash.gif'),
@@ -401,15 +404,17 @@ function get_mimetypes_array() {
'pic' => array ('type'=>'image/pict', 'icon'=>'image.gif'),
'pict' => array ('type'=>'image/pict', 'icon'=>'image.gif'),
'png' => array ('type'=>'image/png', 'icon'=>'image.gif'),
+
'pps' => array ('type'=>'application/vnd.ms-powerpoint', 'icon'=>'powerpoint.gif'),
'ppt' => array ('type'=>'application/vnd.ms-powerpoint', 'icon'=>'powerpoint.gif'),
- 'pptx' => array ('type'=>'application/vnd.ms-powerpoint', 'icon'=>'pptx.gif'),
- 'pptm' => array ('type'=>'application/vnd.ms-powerpoint', 'icon'=>'pptm.gif'),
- 'potx' => array ('type'=>'application/vnd.ms-powerpoint', 'icon'=>'potx.gif'),
- 'potm' => array ('type'=>'application/vnd.ms-powerpoint', 'icon'=>'potm.gif'),
- 'ppam' => array ('type'=>'application/vnd.ms-powerpoint', 'icon'=>'ppam.gif'),
- 'ppsx' => array ('type'=>'application/vnd.ms-powerpoint', 'icon'=>'ppsx.gif'),
- 'ppsm' => array ('type'=>'application/vnd.ms-powerpoint', 'icon'=>'ppsm.gif'),
+ 'pptx' => array ('type'=>'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'icon'=>'pptx.gif'),
+ 'pptm' => array ('type'=>'application/vnd.ms-powerpoint.presentation.macroEnabled.12', 'icon'=>'pptm.gif'),
+ 'potx' => array ('type'=>'application/vnd.openxmlformats-officedocument.presentationml.template', 'icon'=>'potx.gif'),
+ 'potm' => array ('type'=>'application/vnd.ms-powerpoint.template.macroEnabled.12', 'icon'=>'potm.gif'),
+ 'ppam' => array ('type'=>'application/vnd.ms-powerpoint.addin.macroEnabled.12', 'icon'=>'ppam.gif'),
+ 'ppsx' => array ('type'=>'application/vnd.openxmlformats-officedocument.presentationml.slideshow', 'icon'=>'ppsx.gif'),
+ 'ppsm' => array ('type'=>'application/vnd.ms-powerpoint.slideshow.macroEnabled.12', 'icon'=>'ppsm.gif'),
+
'ps' => array ('type'=>'application/postscript', 'icon'=>'pdf.gif'),
'qt' => array ('type'=>'video/quicktime', 'icon'=>'video.gif'),
'ra' => array ('type'=>'audio/x-realaudio', 'icon'=>'audio.gif'),
@@ -454,13 +459,15 @@ function get_mimetypes_array() {
'xdp' => array ('type'=>'application/pdf', 'icon'=>'pdf.gif'),
'xfd' => array ('type'=>'application/pdf', 'icon'=>'pdf.gif'),
'xfdf' => array ('type'=>'application/pdf', 'icon'=>'pdf.gif'),
+
'xls' => array ('type'=>'application/vnd.ms-excel', 'icon'=>'excel.gif'),
- 'xlsx' => array ('type'=>'application/vnd.ms-excel', 'icon'=>'xlsx.gif'),
- 'xlsm' => array ('type'=>'application/vnd.ms-excel', 'icon'=>'xlsm.gif'),
- 'xltx' => array ('type'=>'application/vnd.ms-excel', 'icon'=>'xltx.gif'),
- 'xltm' => array ('type'=>'application/vnd.ms-excel', 'icon'=>'xltm.gif'),
- 'xlsb' => array ('type'=>'application/vnd.ms-excel', 'icon'=>'xlsb.gif'),
- 'xlam' => array ('type'=>'application/vnd.ms-excel', 'icon'=>'xlam.gif'),
+ 'xlsx' => array ('type'=>'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'icon'=>'xlsx.gif'),
+ 'xlsm' => array ('type'=>'application/vnd.ms-excel.sheet.macroEnabled.12', 'icon'=>'xlsm.gif'),
+ 'xltx' => array ('type'=>'application/vnd.openxmlformats-officedocument.spreadsheetml.template', 'icon'=>'xltx.gif'),
+ 'xltm' => array ('type'=>'application/vnd.ms-excel.template.macroEnabled.12', 'icon'=>'xltm.gif'),
+ 'xlsb' => array ('type'=>'application/vnd.ms-excel.sheet.binary.macroEnabled.12', 'icon'=>'xlsb.gif'),
+ 'xlam' => array ('type'=>'application/vnd.ms-excel.addin.macroEnabled.12', 'icon'=>'xlam.gif'),
+
'xml' => array ('type'=>'application/xml', 'icon'=>'xml.gif'),
'xsl' => array ('type'=>'text/xml', 'icon'=>'xml.gif'),
'zip' => array ('type'=>'application/zip', 'icon'=>'zip.gif')
Please sign in to comment.
Something went wrong with that request. Please try again.