From 895e450dfee34c46672244082058d306265b98e8 Mon Sep 17 00:00:00 2001 From: tomolimo Date: Fri, 12 Feb 2016 10:37:32 +0100 Subject: [PATCH] Added default icon when icon is not defined in document type Added default icon when icon is not defined in document type. --- inc/document.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/document.class.php b/inc/document.class.php index 79b2bd20919..2656483e3b8 100644 --- a/inc/document.class.php +++ b/inc/document.class.php @@ -513,6 +513,9 @@ function getDownloadLink($params='', $len=20) { if ($result = $DB->query($query)) { if ($DB->numrows($result) > 0) { $icon = $DB->result($result,0,'icon'); + if (!file_exists(GLPI_ROOT."/".$CFG_GLPI["typedoc_icon_dir"]."/$icon")) { + $icon = "defaut-dist.png" ; + } $out .= " \"".";