alecpl
2010-06-23 b25dfd0913f2ca5666124740c30156fa0a6abaef
program/steps/mail/get.inc
@@ -50,16 +50,7 @@
}
else if ($pid = get_input_value('_part', RCUBE_INPUT_GET)) {
  // TNEF encoded attachment part
  if (preg_match('/^winmail\.([0-9.]+)\.([0-9]+)$/', $pid, $nt)) {
    $pid = $nt[1]; $i = $nt[2];
    if ($part = $MESSAGE->mime_parts[$pid]) {
      $tnef_arr = $IMAP->tnef_decode($part, $MESSAGE->uid);
      if (is_a($tnef_arr[$i], 'rcube_message_part'))
        $MESSAGE->mime_parts[$pid] = $tnef_arr[$i];
    }
  }
  if ($part = $MESSAGE->mime_parts[$pid]) {
    $ctype_primary = strtolower($part->ctype_primary);
    $ctype_secondary = strtolower($part->ctype_secondary);
@@ -82,7 +73,7 @@
    }
    // deliver part content
    if ($ctype_primary == 'text' && $ctype_secondary == 'html') {
    if ($ctype_primary == 'text' && $ctype_secondary == 'html' && empty($_GET['_download'])) {
      // get part body if not available
      if (!$part->body)
        $part->body = $MESSAGE->get_part_content($part->mime_id);
@@ -138,4 +129,4 @@
header('HTTP/1.1 404 Not Found');
exit;
?>