diff --git a/modules/visa/Controllers/VisaController.php b/modules/visa/Controllers/VisaController.php index 9efc7947e35f012cef33e0ecae0122330ae964fa..396ddaf43cd19ec50d0bce48442383df37d5a0a3 100644 --- a/modules/visa/Controllers/VisaController.php +++ b/modules/visa/Controllers/VisaController.php @@ -293,6 +293,10 @@ class VisaController $attachments[$key]['sign'] = $attachmentTypes[$value['attachment_type']]['sign']; $attachments[$key]['thumbnailLink'] = "index.php?page=doc_thumb&module=thumbnails&res_id={$realId}&coll_id={$collId}&display=true&advanced=true"; + + if(!in_array(strtoupper($value['format']), ['PDF', 'JPG', 'JPEG', 'PNG', 'GIF']) ){ + $isVersion = 'false'; + } $attachments[$key]['viewerLink'] = "index.php?display=true&module=attachments&page=view_attachment&res_id_master={$aArgs['resId']}&id={$viewerId}&isVersion={$isVersion}"; }