summaryrefslogtreecommitdiff
path: root/program/steps/mail/headers.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/mail/headers.inc')
-rw-r--r--program/steps/mail/headers.inc43
1 files changed, 23 insertions, 20 deletions
diff --git a/program/steps/mail/headers.inc b/program/steps/mail/headers.inc
index 946a688e9..aa1065531 100644
--- a/program/steps/mail/headers.inc
+++ b/program/steps/mail/headers.inc
@@ -20,28 +20,31 @@
if ($uid = get_input_value('_uid', RCUBE_INPUT_POST))
{
- $source = $IMAP->get_raw_headers($uid);
-
- if ($source)
- {
- $source = htmlspecialchars(trim($source));
- $source = preg_replace(
- array(
- '/\n[\t\s]+/',
- '/^([a-z0-9_:-]+)/im',
- '/\r?\n/'
- ),
- array(
- "\n    ",
- '<font class="bold">\1</font>',
- '<br />'
- ), $source);
-
- $OUTPUT->command('set_headers', $source);
- $OUTPUT->send();
+ $source = $IMAP->get_raw_headers($uid);
+
+ if ($source !== false) {
+ $source = htmlspecialchars(trim($source));
+ $source = preg_replace(
+ array(
+ '/\n[\t\s]+/',
+ '/^([a-z0-9_:-]+)/im',
+ '/\r?\n/'
+ ),
+ array(
+ "\n&nbsp;&nbsp;&nbsp;&nbsp;",
+ '<font class="bold">\1</font>',
+ '<br />'
+ ), $source);
+
+ $OUTPUT->command('set_headers', $source);
+ }
+ else {
+ $RCMAIL->output->show_message('messageopenerror', 'error');
}
+
+ $OUTPUT->send();
}
-
+
exit;
?>