From d7e129e07df65b0603418b4ece926100397a8f66 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 06 Mar 2013 07:17:52 -0500
Subject: [PATCH] Increase maxlength to 254 chars for email input fields in addressbook (#1488987)
---
program/lib/Roundcube/rcube_message.php | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php
index b52b79b..dc70807 100644
--- a/program/lib/Roundcube/rcube_message.php
+++ b/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
--
Gitblit v1.9.1