Ignore:
Timestamp:
10/26/10 14:18:29 (14 years ago)
Author:
brunocosta
Message:

Ticket #1276 - Limite de tamanho para exibição de partes text/plain ou text/html no Expresso mail

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/expressoMail1_2/inc/class.imap_functions.inc.php

    r3402 r3414  
    934934                                                && $file_type != 'attachment') 
    935935                                { 
     936 
     937                                        
     938                                       if($this->prefs['max_msg_size'] == "1") 
     939                                            $max_size = 1048576; 
     940                                        else 
     941                                            $max_size = 102400; 
     942 
    936943                                        if($file_type == "text/plain" && !$show_only_html && $has_multipart) 
    937944                                        { 
    938945                                                // if TXT file size > 100kb, then it will not expand. 
    939                                                 if(!($file_type == "text/plain" && $msg->fsize[$msg_number][$values] > 102400)) { 
     946                                                if(!($file_type == "text/plain" && $msg->fsize[$msg_number][$values] > $max_size)) { 
    940947                                                         $content .= htmlentities($this->decodeBody(imap_fetchbody($this->mbox, $msg_number, $msg_part, FT_UID), $msg->encoding[$msg_number][$values], $msg->charset[$msg_number][$values]));  
    941                                  $content = '<pre>' . $content . '</pre>';     
     948                                                        $content = '<pre>' . $content . '</pre>'; 
    942949                                                } 
    943950                                        } 
    944951                                        // if HTML attachment file size > 300kb, then it will not expand. 
    945                                         else if($file_type == "text/html"  && $msg->fsize[$msg_number][$values] < 307200) 
     952                                        else if($file_type == "text/html"  && $msg->fsize[$msg_number][$values] < $max_size*3) 
    946953                                        { 
    947954                                                $content .= $this->decodeBody(imap_fetchbody($this->mbox, $msg_number, $msg_part, FT_UID), $msg->encoding[$msg_number][$values], $msg->charset[$msg_number][$values]); 
Note: See TracChangeset for help on using the changeset viewer.