summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/mail/show.inc
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-02-06 07:41:11 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-02-06 07:41:11 +0000
commit9742b560e4d77f466ec99a69765a1520a2181bf5 (patch)
treea2a4a37b9e2da352513bb266e45883623037dce5 /roundcubemail/program/steps/mail/show.inc
parent8a0afcbc33c19b304ed360f51a3604cc992eb94e (diff)
Remember decision to display images for a certain message during session (#1484754)
git-svn-id: https://svn.roundcube.net/trunk@1023 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/show.inc')
-rw-r--r--roundcubemail/program/steps/mail/show.inc10
1 files changed, 8 insertions, 2 deletions
diff --git a/roundcubemail/program/steps/mail/show.inc b/roundcubemail/program/steps/mail/show.inc
index 2f0fb015d..9e9ba8df4 100644
--- a/roundcubemail/program/steps/mail/show.inc
+++ b/roundcubemail/program/steps/mail/show.inc
@@ -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'])