From 336995ea76e5c20df673723c1e25bff9d20d9e73 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Sat, 11 Jul 2020 07:08:51 +0000 Subject: [PATCH] Allow plugins to provide their own view/download attachment links git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14870 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mime.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/functions/mime.php b/functions/mime.php index 313c2c83..cafd41c3 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -648,8 +648,14 @@ function buildAttachmentArray($message, $exclude_id, $mailbox, $id) { $this_attachment['ContentType'] = sm_encode_html_special_chars($type0 .'/'. $type1); $this_attachment['OtherLinks'] = array(); foreach ($links as $val) { - if ($val['text']==_("Download") || $val['text'] == _("View")) + if ($val['text']==_("Download")) { + $this_attachment['DownloadHREF'] = $val['href']; continue; + } + if ($val['text']==_("View")) { + $this_attachment['ViewHREF'] = $val['href']; + continue; + } if (empty($val['text']) && empty($val['extra'])) continue; -- 2.25.1