summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
Diffstat (limited to 'program')
-rw-r--r--program/localization/en_US/labels.inc1
-rw-r--r--program/steps/mail/func.inc9
-rw-r--r--program/steps/mail/show.inc2
3 files changed, 10 insertions, 2 deletions
diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc
index fa8f33d6d..b5fcee496 100644
--- a/program/localization/en_US/labels.inc
+++ b/program/localization/en_US/labels.inc
@@ -378,6 +378,7 @@ $labels['preferhtml'] = 'Display HTML';
$labels['defaultcharset'] = 'Default Character Set';
$labels['htmlmessage'] = 'HTML Message';
$labels['messagepart'] = 'Part';
+$labels['digitalsig'] = 'Digital Signature';
$labels['dateformat'] = 'Date format';
$labels['timeformat'] = 'Time format';
$labels['prettydate'] = 'Pretty dates';
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index bedd3e8ea..44a1557c3 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -1838,7 +1838,7 @@ function rcmail_fix_mimetype($name)
}
// return attachment filename, handle empty filename case
-function rcmail_attachment_name($attachment)
+function rcmail_attachment_name($attachment, $display = false)
{
$filename = $attachment->filename;
@@ -1858,6 +1858,13 @@ function rcmail_attachment_name($attachment)
$filename = preg_replace('[\r\n]', '', $filename);
+ // Display smart names for some known mimetypes
+ if ($display) {
+ if (preg_match('/application\/(pgp|pkcs7)-signature/i', $attachment->mimetype)) {
+ $filename = rcube_label('digitalsig');
+ }
+ }
+
return $filename;
}
diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc
index 22f4ff4c2..64e628880 100644
--- a/program/steps/mail/show.inc
+++ b/program/steps/mail/show.inc
@@ -150,7 +150,7 @@ function rcmail_message_attachments($attrib)
if (sizeof($MESSAGE->attachments)) {
foreach ($MESSAGE->attachments as $attach_prop) {
- $filename = rcmail_attachment_name($attach_prop);
+ $filename = rcmail_attachment_name($attach_prop, true);
if ($PRINT_MODE) {
$size = $RCMAIL->message_part_size($attach_prop);