| | |
| | | $part = $MESSAGE->mime_parts[$part]; |
| | | $table = new html_table(array('cols' => 3)); |
| | | |
| | | $filename = $part->filename; |
| | | if (empty($filename) && $attach_prop->mimetype == 'text/html') { |
| | | $filename = rcube_label('htmlmessage'); |
| | | } |
| | | $filename = rcmail_attachment_name($part); |
| | | |
| | | if (!empty($filename)) { |
| | | $table->add('title', Q(rcube_label('filename'))); |
| | |
| | | |
| | | return $table->show($attrib); |
| | | } |
| | | |
| | | |
| | | |
| | | function rcmail_message_part_frame($attrib) |
| | |
| | | return $name; |
| | | } |
| | | |
| | | // return attachment filename, handle empty filename case |
| | | function rcmail_attachment_name($attachment) |
| | | { |
| | | $filename = $attachment->filename; |
| | | |
| | | if ($filename === null || $filename === '') { |
| | | if ($attachment->mimetype == 'text/html') { |
| | | $filename = rcube_label('htmlmessage'); |
| | | } |
| | | else { |
| | | $ext = rcube_mime::get_mime_extensions($attachment->mimetype); |
| | | $ext = array_shift($ext); |
| | | $filename = rcube_label('messagepart') . ' ' . $attachment->mime_id; |
| | | if ($ext) { |
| | | $filename .= '.' . $ext; |
| | | } |
| | | } |
| | | } |
| | | |
| | | $filename = preg_replace('[\r\n]', '', $filename); |
| | | |
| | | return $filename; |
| | | } |
| | | |
| | | function rcmail_search_filter($attrib) |
| | | { |
| | | global $OUTPUT, $CONFIG; |