summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/func.inc13
-rw-r--r--program/steps/mail/headers.inc3
2 files changed, 12 insertions, 4 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 7f0b4db5b..8bf80a6ee 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -90,11 +90,13 @@ if (empty($RCMAIL->action) || $RCMAIL->action == 'list') {
// set current mailbox and some other vars in client environment
$OUTPUT->set_env('mailbox', $mbox_name);
$OUTPUT->set_env('pagesize', $RCMAIL->storage->get_pagesize());
- $OUTPUT->set_env('quota', $RCMAIL->storage->get_capability('QUOTA'));
$OUTPUT->set_env('delimiter', $RCMAIL->storage->get_hierarchy_delimiter());
$OUTPUT->set_env('threading', $threading);
$OUTPUT->set_env('threads', $threading || $RCMAIL->storage->get_capability('THREAD'));
$OUTPUT->set_env('preview_pane_mark_read', $RCMAIL->config->get('preview_pane_mark_read', 0));
+ if ($RCMAIL->storage->get_capability('QUOTA')) {
+ $OUTPUT->set_env('quota', true);
+ }
if ($CONFIG['delete_junk'])
$OUTPUT->set_env('delete_junk', true);
@@ -1053,12 +1055,17 @@ function rcmail_message_full_headers($attrib, $headers=NULL)
global $OUTPUT;
$html = html::div(array('id' => "all-headers", 'class' => "all", 'style' => 'display:none'), html::div(array('id' => 'headers-source'), ''));
- $html .= html::div(array('class' => "more-headers show-headers", 'onclick' => "return ".JS_OBJECT_NAME.".command('show-headers','',this)"), '');
+
+ if (!get_boolean($attrib['no-switch'])) {
+ $html .= html::div(array('class' => "more-headers show-headers", 'onclick' => "return ".JS_OBJECT_NAME.".command('show-headers','',this)"), '');
+ }
+
+ unset($attrib['no-switch']);
$OUTPUT->add_gui_object('all_headers_row', 'all-headers');
$OUTPUT->add_gui_object('all_headers_box', 'headers-source');
- return html::div($attrib, $html);
+ return count($attrib) > 1 ? html::div($attrib, $html) : $html;
}
diff --git a/program/steps/mail/headers.inc b/program/steps/mail/headers.inc
index 4d6627393..cad113f68 100644
--- a/program/steps/mail/headers.inc
+++ b/program/steps/mail/headers.inc
@@ -24,7 +24,8 @@ if ($uid = get_input_value('_uid', RCUBE_INPUT_POST))
$source = $RCMAIL->storage->get_raw_headers($uid);
if ($source !== false) {
- $source = htmlspecialchars(trim($source));
+ $source = trim(rcube_charset::clean($source));
+ $source = htmlspecialchars($source);
$source = preg_replace(
array(
'/\n[\t\s]+/',