Remember decision to display images for a certain message during session (#1484754)

release-0.6
thomascube 17 years ago
parent c08b7347c1
commit 6726f0c369

@ -1,6 +1,10 @@
CHANGELOG RoundCube Webmail
---------------------------
2008/02/06 (thomasb)
----------
- Remember decision to display images for a certain message during session (#1484754)
2008/02/05 (thomasb)
----------
- Fix regular expression for checking e-mail address (#1484710)
@ -8,6 +12,7 @@ CHANGELOG RoundCube Webmail
- Respect config when localize folder names (#1484707)
- Applied patch for updating page title (#1484727, #1484650)
- Applied patch to prevent from purging inbox by uberlinuxguy (#1484449)
- Applied patch to prevent bad header delimiters (#1484751)
- Also send search request when deleting a contact (#1484620)
- Add CSS hack for Safari

@ -638,7 +638,7 @@ function rcmail_parse_message(&$structure, $arg=array(), $recursive=FALSE)
$structure->type = 'content';
$a_return_parts[] = &$structure;
}
// message contains alternative parts
else if ($message_ctype_primary=='multipart' && $message_ctype_secondary=='alternative' && is_array($structure->parts))
{
@ -744,6 +744,10 @@ function rcmail_parse_message(&$structure, $arg=array(), $recursive=FALSE)
$a_return_parts = array_merge($a_return_parts, $parts);
$a_attachments = array_merge($a_attachments, $attachmnts);
}
// ignore "virtual" protocol parts
else if ($primary_type=='protocol')
continue;
// part is file/attachment
else if ($mail_part->disposition=='attachment' || $mail_part->disposition=='inline' || $mail_part->headers['content-id'] ||
@ -861,7 +865,7 @@ function rcmail_message_body($attrib)
if (!$attrib['id'])
$attrib['id'] = 'rcmailMsgBody';
$safe_mode = intval($_GET['_safe']);
$safe_mode = $MESSAGE['is_safe'] || intval($_GET['_safe']);
$attrib_str = create_attrib_string($attrib, array('style', 'class', 'id'));
$out = '<div '. $attrib_str . ">\n";

@ -42,6 +42,12 @@ if ($_GET['_uid'])
return;
}
}
// check if safe flag is set
if ($MESSAGE['is_safe'] = intval($_GET['_safe']))
$_SESSION['safe_messages'][$MESSAGE['UID']] = true;
else if ($_SESSION['safe_messages'][$MESSAGE['UID']])
$MESSAGE['is_safe'] = 1;
// calculate Etag for this request
$etag = md5($MESSAGE['UID'].$IMAP->get_mailbox_name().session_id().intval($MESSAGE['headers']->mdn_sent).intval($PRINT_MODE));
@ -58,7 +64,7 @@ if ($_GET['_uid'])
if ($MESSAGE['structure'] = $IMAP->get_structure($MESSAGE['UID']))
list($MESSAGE['parts'], $MESSAGE['attachments']) = rcmail_parse_message(
$MESSAGE['structure'],
array('safe' => intval($_GET['_safe']),
array('safe' => $MESSAGE['is_safe'],
'prefer_html' => $CONFIG['prefer_html'],
'get_url' => $GET_URL.'&_part=%s')
);
@ -72,7 +78,7 @@ if ($_GET['_uid'])
// give message uid to the client
$OUTPUT->set_env('uid', $MESSAGE['UID']);
$OUTPUT->set_env('safemode', intval($_GET['_safe']));
$OUTPUT->set_env('safemode', $MESSAGE['is_safe']);
// check for unset disposition notification
if ($MESSAGE['headers']->mdn_to && !$MESSAGE['headers']->mdn_sent && $IMAP->get_mailbox_name() != $CONFIG['drafts_mbox'])

Loading…
Cancel
Save