alecpl
2010-11-14 a4c970508b899fd9e467b33319d689470908a24c
program/steps/mail/func.inc
@@ -46,7 +46,7 @@
}
// set imap properties and session vars
if ($mbox = get_input_value('_mbox', RCUBE_INPUT_GPC))
if (strlen(trim($mbox = get_input_value('_mbox', RCUBE_INPUT_GPC, true))))
  $IMAP->set_mailbox(($_SESSION['mbox'] = $mbox));
else if ($IMAP)
  $_SESSION['mbox'] = $IMAP->get_mailbox_name();
@@ -831,8 +831,12 @@
    $quote_level = $q;
  }
  // quote plain text
  $body = Q(join("\n", $a_lines), 'dummy', false);
  $body = join("\n", $a_lines);
  // quote plain text (don't use Q() here, to display entities "as is")
  $table = get_html_translation_table(HTML_SPECIALCHARS);
  unset($table['?']);
  $body = strtr($body, $table);
  // colorize signature (up to <sig_max_lines> lines)
  $len = strlen($body);
@@ -972,7 +976,7 @@
  foreach ($plugin['output'] as $hkey => $row) {
    $table->add(array('class' => 'header-title'), Q($row['title']));
    $table->add(array('class' => $hkey, 'width' => "90%"), Q($row['value'], ($hkey == 'subject' ? 'strict' : 'show')));
    $table->add(array('class' => 'header '.$hkey), Q($row['value'], ($hkey == 'subject' ? 'strict' : 'show')));
  }
  // all headers division
@@ -1540,6 +1544,7 @@
      $delim   = $RCMAIL->config->header_delimiter();
      $to      = $headers_enc['To'];
      $subject = $headers_enc['Subject'];
      $header_str = rtrim($header_str);
      if ($delim != "\r\n") {
        $header_str = str_replace("\r\n", $delim, $header_str);