Skip to content

Commit

Permalink
Merge pull request #452 from tomolimo/patch-3
Browse files Browse the repository at this point in the history
Added default icon when icon is not defined in document type
  • Loading branch information
orthagh committed Feb 15, 2016
2 parents 6ac5e75 + 895e450 commit 628bde3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions inc/document.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 .= "&nbsp;<img class='middle' style='margin-left:3px; margin-right:6px;' alt=\"".
$initfileout."\" title=\"".$initfileout."\" src='".
$CFG_GLPI["typedoc_icon_dir"]."/$icon'>";
Expand Down

0 comments on commit 628bde3

Please sign in to comment.