Thomas Bruederli
2015-09-10 f7f75ff7d11b9e3cc722210f7037fc1e6c3c3b61
program/steps/mail/compose.inc
@@ -782,15 +782,13 @@
            foreach ($MESSAGE->parts as $part) {
                if ($part->realtype == 'multipart/encrypted') {
                    // find the encrypted message payload part
                    foreach ($MESSAGE->mime_parts as $mime_id => $mpart) {
                        if ($mpart->mimetype == 'application/octet-stream' || !empty($mpart->filename)) {
                            $RCMAIL->output->set_env('pgp_mime_message', array(
                                '_mbox' => $RCMAIL->storage->get_folder(), '_uid' => $MESSAGE->uid, '_part' => $mime_id,
                            ));
                            $RCMAIL->output->set_env('compose_mode', $compose_mode);
                            $MESSAGE->pgp_mime = true;
                            break;
                        }
                    if ($pgp_mime_part = $MESSAGE->get_multipart_encrypted_part()) {
                        $RCMAIL->output->set_env('pgp_mime_message', array(
                            '_mbox' => $RCMAIL->storage->get_folder(),
                            '_uid'  => $MESSAGE->uid,
                            '_part' => $pgp_mime_part->mime_id,
                        ));
                        $RCMAIL->output->set_env('compose_mode', $compose_mode);
                    }
                    continue;
                }
@@ -1271,6 +1269,11 @@
                continue;
            }
            // skip version.txt parts of multipart/encrypted messages
            if ($message->pgp_mime && $part->mimetype == 'application/pgp-encrypted' && $part->filename == 'version.txt') {
                continue;
            }
            // skip message/rfc822 attachments on forwards (#1489214)
            // Thunderbird when forwarding in inline mode displays such attachments
            // and skips any attachments from inside of such part, this however