summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/mail/headers.inc
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-06-08 12:46:05 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-06-08 12:46:05 +0000
commitd9daaac0849808d71f20faed21df4b51a3df0186 (patch)
treeeb62d478cc4d477d5da3c82fae4c0eeb4f01540d /roundcubemail/program/steps/mail/headers.inc
parent1f6d9ef93e019d30c6afbfcb401620c2bab6f2c5 (diff)
- Fix some IMAP errors handling when opening the message (#1485443)
git-svn-id: https://svn.roundcube.net/trunk@3726 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/headers.inc')
-rw-r--r--roundcubemail/program/steps/mail/headers.inc41
1 files changed, 22 insertions, 19 deletions
diff --git a/roundcubemail/program/steps/mail/headers.inc b/roundcubemail/program/steps/mail/headers.inc
index 946a688e9..aa1065531 100644
--- a/roundcubemail/program/steps/mail/headers.inc
+++ b/roundcubemail/program/steps/mail/headers.inc
@@ -20,28 +20,31 @@
if ($uid = get_input_value('_uid', RCUBE_INPUT_POST))
{
- $source = $IMAP->get_raw_headers($uid);
+ $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&nbsp;&nbsp;&nbsp;&nbsp;",
- '<font class="bold">\1</font>',
- '<br />'
- ), $source);
-
- $OUTPUT->command('set_headers', $source);
- $OUTPUT->send();
+ 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;
?>