Ignore:
Timestamp:
08/03/09 10:09:55 (15 years ago)
Author:
amuller
Message:

Ticket #000 - Defazendo commit errado para refazer o certo em seguida

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/class.imap_functions.inc.php

    r1246 r1247  
    6060                // This error is returned from Postfix. 
    6161                elseif(strstr($error,'message file too big')) { 
    62                         return str_replace("%1", $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['max_attachment_size']."M",$this->functions->getLang('The size of this message has exceeded  the limit (%1B).')); 
     62                        return str_replace("%1", ini_get('upload_max_filesize'),$this->functions->getLang('The size of this message has exceeded  the limit (%1B).'));                   
    6363                } 
    6464                elseif(strstr($error,'virus')) { 
     
    210210                        return $this->htmlspecialchars_encode($string); 
    211211        } 
    212  
    213212        /** 
    214213        * Função que importa arquivos .eml exportados pelo expresso para a caixa do usuário. Testado apenas 
     
    16301629            $body = $params['body']; 
    16311630        } 
     1631                //echo "<script language=\"javascript\">javascript:alert('".$body."');</script>"; 
    16321632                $attachments = $params['FILES']; 
    16331633                $forwarding_attachments = $params['forwarding_attachments']; 
     
    18031803                                } 
    18041804                                $tempDir = ini_get("session.save_path"); 
    1805                                 $file = "cidimage_".$GLOBALS['phpgw']->session->sessionid.".dat";                                        
     1805                                $file = "cidimage_".$_SESSION[ 'phpgw_session' ][ 'session_id' ].$cid_imgs[6][$j].".dat";        
    18061806                                $f = fopen($tempDir.'/'.$file,"w"); 
    18071807                                fputs($f,$fileContent); 
     
    18181818                { 
    18191819                        $total_uploaded_size = 0; 
    1820                         $upload_max_filesize = $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['max_attachment_size']; 
     1820                        $upload_max_filesize = str_replace("M","",ini_get('upload_max_filesize')) * 1024 * 1024; 
    18211821                        foreach ($attachments as $attach) 
    18221822                        { 
     
    18241824                                $total_uploaded_size = $total_uploaded_size + $attach['size']; 
    18251825                        } 
    1826                         if( $total_uploaded_size > $upload_max_filesize)  
     1826                        if( $total_uploaded_size > $upload_max_filesize) 
    18271827                                return $this->parse_error("message file too big");                       
    18281828                } 
     
    23152315                                } 
    23162316                                $tempDir = ini_get("session.save_path"); 
    2317                                 $file = "cidimage_".$GLOBALS['phpgw']->session->sessionid.".dat";                                        
     2317                                $file = "cidimage_".$_SESSION[ 'phpgw_session' ][ 'session_id' ].$cid_imgs[6][$j].".dat";                                        
    23182318                                $f = fopen($tempDir.'/'.$file,"w"); 
    23192319                                fputs($f,$fileContent); 
     
    23662366                                        case 3: $image_big = imagecreatefrompng($attach['tmp_name']); break; 
    23672367                                        case 6: 
    2368                                                 include_once("gd_functions.php"); 
     2368                                                require_once("gd_functions.php"); 
    23692369                                                $image_big = imagecreatefrombmp($attach['tmp_name']); break; 
    23702370                                        default: 
     
    23902390                                        imagecopyresampled($image_new, $image_big, 0, 0, 0, 0, $new_width, $new_height, $width, $height); 
    23912391                                        $tmpDir = ini_get("session.save_path"); 
    2392                                         $_file = "cidimage_".$GLOBALS['phpgw']->session->sessionid.".dat";  
     2392                                        $_file = "cidimage_".$_SESSION[ 'phpgw_session' ][ 'session_id' ].".dat";  
    23932393                                        imagejpeg($image_new,$tmpDir.$_file, 85); 
    23942394                                        $mail->AddAttachment($tmpDir.$_file, $attach['name'], "base64", $this->get_file_type($tmpDir.$_file)); 
     
    32633263        if($timestamp){ 
    32643264            $tempDir = ini_get("session.save_path"); 
    3265             $file = $tempDir."imap_".$GLOBALS['phpgw']->session->sessionid; 
     3265            $file = $tempDir."imap_".$_SESSION[ 'phpgw_session' ][ 'session_id' ]; 
    32663266                $f = fopen($file,"w"); 
    32673267                fputs($f,base64_encode($source)); 
Note: See TracChangeset for help on using the changeset viewer.