Aleksander Machniak
2013-03-06 d7e129e07df65b0603418b4ece926100397a8f66
program/lib/Roundcube/rcube_message.php
@@ -321,7 +321,7 @@
            $mimetype = $structure->real_mimetype;
            // parse headers from message/rfc822 part
            if (!isset($structure->headers['subject'])) {
            if (!isset($structure->headers['subject']) && !isset($structure->headers['from'])) {
                list($headers, $dump) = explode("\r\n\r\n", $this->get_part_content($structure->mime_id, null, true, 8192));
                $structure->headers = rcube_mime::parse_headers($headers);
            }
@@ -330,7 +330,7 @@
            $mimetype = $structure->mimetype;
        // show message headers
        if ($recursive && is_array($structure->headers) && isset($structure->headers['subject'])) {
        if ($recursive && is_array($structure->headers) && (isset($structure->headers['subject']) || isset($structure->headers['from']))) {
            $c = new stdClass;
            $c->type = 'headers';
            $c->headers = $structure->headers;
@@ -468,6 +468,17 @@
            $this->parts[] = $p;
        }
        // this is an S/MIME ecrypted message -> create a plaintext body with the according message
        else if ($mimetype == 'application/pkcs7-mime') {
            $p = new stdClass;
            $p->type            = 'content';
            $p->ctype_primary   = 'text';
            $p->ctype_secondary = 'plain';
            $p->mimetype        = 'text/plain';
            $p->realtype        = 'application/pkcs7-mime';
            $this->parts[] = $p;
        }
        // message contains multiple parts
        else if (is_array($structure->parts) && !empty($structure->parts)) {
            // iterate over parts