From: Michael M Slusarz Date: Thu, 3 Dec 2009 20:40:09 +0000 (-0700) Subject: Add Face header support to IMP X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=540aa75ffcc2608c3a10983a67a945701f0de331;p=horde.git Add Face header support to IMP --- diff --git a/imp/docs/CHANGES b/imp/docs/CHANGES index 82b87f179..f4957a40c 100644 --- a/imp/docs/CHANGES +++ b/imp/docs/CHANGES @@ -2,6 +2,7 @@ v5.0-git -------- +[mms] Add Face: header support to IMP. [mms] Add splitbar to resize sidebar in DIMP. [mms] Use LIST-EXTENDED IMAP extension (RFC 5258) to get subscribed mailbox information, if available. diff --git a/imp/docs/RFCS b/imp/docs/RFCS index d83e6089f..69328f7d6 100644 --- a/imp/docs/RFCS +++ b/imp/docs/RFCS @@ -134,3 +134,10 @@ RFC 3156 RFC 3464 - An Extensible Message Format for Delivery Status Notifications + + +Non-RFC Features +================ + +Face Header (view support) + - http://quimby.gnus.org/circus/face/ diff --git a/imp/message.php b/imp/message.php index 49f8a69c7..a1bd91350 100644 --- a/imp/message.php +++ b/imp/message.php @@ -258,6 +258,14 @@ if (!empty($from_img)) { $display_headers['from'] .= ' ' . $from_img; } +/* Look for Face: information. */ +if ($mime_headers->getValue('face')) { + $view_url = IMP::generateIMPUrl('view.php', $imp_mbox['mailbox'], $uid, $mailbox_name); + // TODO: Use Data URL + $view_url->add('actionID', 'view_face'); + $display_headers['from'] .= ' '; +} + /* Build To/Cc/Bcc links. */ foreach (array('to', 'cc', 'bcc') as $val) { $msgAddresses[] = $mime_headers->getValue($val); @@ -363,9 +371,6 @@ if ($next_msg) { /* Generate the mailbox link. */ $mailbox_url = Horde_Util::addParameter(IMP::generateIMPUrl('mailbox.php', $imp_mbox['mailbox']), 'start', $msgindex); -/* Generate the view link. */ -$view_link = IMP::generateIMPUrl('view.php', $imp_mbox['mailbox'], $uid, $mailbox_name); - /* Everything below here is related to preparing the output. */ /* Set the status information of the message. */ diff --git a/imp/view.php b/imp/view.php index 676b31b2a..039de9c95 100644 --- a/imp/view.php +++ b/imp/view.php @@ -10,6 +10,7 @@ * 'download_render' * 'save_message' * 'view_attach' + * 'view_face' * 'view_source' * 'ctype' - (string) The content-type to use instead of the content-type * found in the original Horde_Mime_Part object. @@ -194,4 +195,13 @@ case 'save_message': rewind($msg); fpassthru($msg); break; + +case 'view_face': + $mime_headers = $contents->getHeaderOb(); + if ($face = $mime_headers->getValue('face')) { + $face = base64_decode($face); + $browser->downloadHeaders(null, 'image/png', true, strlen($face)); + echo $face; + } + break; }