Browse Source

Merge pull request #374 from mkoch227/bug-fix-download-attachment-email

#370 Fix download attachment with email required
merge-requests/2/head
Mike Koch 6 years ago
parent
commit
ed092c1bbd
  1. 9
      inc/view_attachment_functions.inc.php

9
inc/view_attachment_functions.inc.php

@ -3,6 +3,11 @@ function mfh_listAttachments($attachments = '', $reply = 0, $is_staff)
{
global $hesk_settings, $hesklang, $trackingID, $can_edit, $can_delete;
$email = '';
if (!$is_staff) {
$email = $hesk_settings['e_query'];
}
/* Attachments disabled or not available */
if (!$hesk_settings['attachments']['use'] || !strlen($attachments)) {
return false;
@ -59,7 +64,7 @@ function mfh_listAttachments($attachments = '', $reply = 0, $is_staff)
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">' . $hesklang['close_modal'] . '</button>
<a href="' . $download_path . 'download_attachment.php?att_id=' . $att_id . '&amp;track=' . $trackingID . '" class="btn btn-success">' . $hesklang['dnl'] . '</a>
<a href="' . $download_path . 'download_attachment.php?att_id=' . $att_id . '&amp;track=' . $trackingID . $email . '" class="btn btn-success">' . $hesklang['dnl'] . '</a>
</div>
</div>
</div>
@ -87,7 +92,7 @@ function mfh_listAttachments($attachments = '', $reply = 0, $is_staff)
echo '<a class="btn btn-danger" href="admin_ticket.php?delatt=' . $att_id . '&amp;reply=' . $reply . '&amp;track=' . $trackingID . '&amp;Refresh=' . mt_rand(10000, 99999) . '&amp;token=' . hesk_token_echo(0) . '" onclick="return hesk_confirmExecute(\'' . hesk_makeJsString($hesklang['pda']) . '\');" data-toggle="tooltip" data-placement="top" data-original-title="' . $hesklang['delete'] . '"><i class="fa fa-times"></i></a> ';
}
}
echo '<a class="btn btn-success" href="' . $download_path . 'download_attachment.php?att_id=' . $att_id . '&amp;track=' . $trackingID . '"
echo '<a class="btn btn-success" href="' . $download_path . 'download_attachment.php?att_id=' . $att_id . '&amp;track=' . $trackingID . $email . '"
data-toggle="tooltip" data-placement="top" data-original-title="' . $hesklang['dnl'] . '">
<i class="fa fa-arrow-down"></i>
</a>';

Loading…
Cancel
Save