From 146785d57afdceabd2f3c7a42398e302a04339d0 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 15 Feb 2018 18:00:04 +0100 Subject: [PATCH] deal with old MS Office mime-times have multiple extensions eg. application/msword uses doc and dot --- filemanager/inc/class.filemanager_hooks.inc.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/filemanager/inc/class.filemanager_hooks.inc.php b/filemanager/inc/class.filemanager_hooks.inc.php index d3812c4065..44dcdb4bbd 100644 --- a/filemanager/inc/class.filemanager_hooks.inc.php +++ b/filemanager/inc/class.filemanager_hooks.inc.php @@ -238,8 +238,14 @@ class filemanager_hooks $mimes = array(); foreach ($editorLink['mime'] as $mime => $value) { - $mimes[$mime] = $value['ext']; + $mimes[$mime] = lang('%1 file', strtoupper($value['ext'])).' ('.$mime.')'; + + if (!empty($value['extra_extensions'])) + { + $mimes[$mime] .= ', '.strtoupper(implode(', ', $value['extra_extensions'])); + } } + asort($mimes); $settings += array ( 'sections.2' => array( 'type' => 'section',