Changeset cfe4a6b in github


Ignore:
Timestamp:
Jun 5, 2008 1:35:12 PM (5 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
cd67494
Parents:
0770703
Message:

Fix structure parsing and html output for multipart messages

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube_imap.php

    r0770703 rcfe4a6b  
    10751075       
    10761076      // find first non-array entry 
    1077       for ($i=1; count($part); $i++) 
     1077      for ($i=1; $i<count($part); $i++) 
    10781078        if (!is_array($part[$i])) 
    10791079          { 
     
    10861086      $struct->parts = array(); 
    10871087      for ($i=0, $count=0; $i<count($part); $i++) 
    1088         if (is_array($part[$i]) && count($part[$i]) > 5) 
     1088        if (is_array($part[$i]) && count($part[$i]) > 3) 
    10891089          $struct->parts[] = $this->_structure_part($part[$i], ++$count, $struct->mime_id); 
    10901090           
  • program/lib/imap.inc

    r49e5f72 rcfe4a6b  
    25712571                        } while (!preg_match("/^$key/", $line)); 
    25722572 
    2573                         $result = trim(substr($result, strpos($result, 'BODYSTRUCTURE')+13,  
    2574                                     -(strlen($result)-strrpos($result, $key)-2))); 
     2573                        $result = trim(substr($result, strpos($result, 'BODYSTRUCTURE')+13, -(strlen($result)-strrpos($result, $key)+1))); 
    25752574                } 
    25762575        } 
  • program/steps/mail/func.inc

    r0a99895 rcfe4a6b  
    550550  // text/enriched 
    551551  else if ($part->ctype_secondary=='enriched') { 
     552    $part->ctype_secondary = 'html'; 
    552553    return Q(enriched_to_html($body), 'show'); 
    553554  } 
     
    646647  if (!$headers) 
    647648    $headers = is_object($MESSAGE->headers) ? get_object_vars($MESSAGE->headers) : $MESSAGE->headers; 
     649     
     650  // add empty subject if none exsists 
     651  if (empty($headers['subject'])) 
     652    $headers['subject'] = rcube_label('nosubject'); 
    648653   
    649654  $header_count = 0; 
     
    721726        $body = rcmail_print_body($part, $safe_mode, !$CONFIG['prefer_html']); 
    722727         
    723         if ($part->ctype_secondary != 'plain') 
     728        if ($part->ctype_secondary == 'html') 
    724729          $out .= html::div('message-htmlpart', rcmail_html4inline($body, $attrib['id'])); 
    725730        else 
     
    729734    } 
    730735  else 
    731     $out .= html::div('message-part', html::div('pre', $MESSAGE->body)); 
     736    $out .= html::div('message-part', html::div('pre', Q($MESSAGE->body))); 
    732737 
    733738 
  • skins/default/mail.css

    r8586bff rcfe4a6b  
    678678} 
    679679 
    680 div.message-part a 
     680div.message-part a, 
     681div.message-htmlpart a 
    681682{ 
    682683  color: #0000CC; 
Note: See TracChangeset for help on using the changeset viewer.