thomascube
2010-09-21 cb2bc809ef29f349d38c89e202d821e67bb4c947
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    ",
        '<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;
?>