From b7e54d3b4577a7d8af2be950a44643c70d5279af Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Fri, 21 Aug 2015 12:29:20 -0400 Subject: [PATCH] #321 Fix downloads for helpdesks not at root level --- inc/view_attachment_functions.inc.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/inc/view_attachment_functions.inc.php b/inc/view_attachment_functions.inc.php index 39dee973..2f787f54 100644 --- a/inc/view_attachment_functions.inc.php +++ b/inc/view_attachment_functions.inc.php @@ -45,6 +45,10 @@ function mfh_listAttachments($attachments='', $reply=0, $is_staff) echo ' '.$hesklang['image'].' '; + $download_path = ''; + if ($is_staff) { + $download_path = '../'; + } echo ' @@ -78,11 +82,14 @@ function mfh_listAttachments($attachments='', $reply=0, $is_staff) echo '
'; /* Can edit and delete tickets? */ - if ($is_staff && $can_edit && $can_delete) - { - echo ' '; + $download_path = ''; + if ($is_staff) { + $download_path = '../'; + if ($can_edit && $can_delete) { + echo ' '; + } } - echo ' ';