mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-09 11:08:34 +01:00
FIX picto for unknown mime type
This commit is contained in:
@@ -5980,7 +5980,7 @@ function img_mime($file, $titlealt = '', $morecss = '')
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
|
|
||||||
$mimetype = dol_mimetype($file, '', 1);
|
$mimetype = dol_mimetype($file, '', 1);
|
||||||
$mimeimg = dol_mimetype($file, '', 2);
|
//$mimeimg = dol_mimetype($file, '', 2);
|
||||||
$mimefa = dol_mimetype($file, '', 4);
|
$mimefa = dol_mimetype($file, '', 4);
|
||||||
|
|
||||||
if (empty($titlealt)) {
|
if (empty($titlealt)) {
|
||||||
@@ -12372,6 +12372,11 @@ function dol_mimetype($file, $default = 'application/octet-stream', $mode = 0)
|
|||||||
$famime = 'file-alt';
|
$famime = 'file-alt';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($famime == 'file-o') {
|
||||||
|
// file-o seems to not work in fontawesome 5
|
||||||
|
$famime = 'file';
|
||||||
|
}
|
||||||
|
|
||||||
// Return mimetype string
|
// Return mimetype string
|
||||||
switch ((int) $mode) {
|
switch ((int) $mode) {
|
||||||
case 1:
|
case 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user