summaryrefslogtreecommitdiff
path: root/program/steps/mail/compose.inc
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-12-28 12:40:57 +0100
committerAleksander Machniak <alec@alec.pl>2012-12-28 12:40:57 +0100
commitbe72fb3597c21ca3aaa058adf41bb72d53d197c7 (patch)
treef1f77633fb77f105305967b760f7d37a8372409d /program/steps/mail/compose.inc
parent8809a1828477101ade03b261662df089e268ecb4 (diff)
Unified attachments filenames handling for message parts without a filename
Diffstat (limited to 'program/steps/mail/compose.inc')
-rw-r--r--program/steps/mail/compose.inc11
1 files changed, 1 insertions, 10 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 379e920e5..74c6d5f29 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -1154,16 +1154,7 @@ function rcmail_save_attachment(&$message, $pid)
}
$mimetype = $part->ctype_primary . '/' . $part->ctype_secondary;
- $filename = $part->filename;
- if (!strlen($filename)) {
- if ($mimetype == 'text/html') {
- $filename = rcube_label('htmlmessage');
- }
- else {
- $filename = 'Part_'.$pid;
- }
- $filename .= '.' . $part->ctype_secondary;
- }
+ $filename = rcmail_attachment_name($part);
$attachment = array(
'group' => $COMPOSE['id'],