Changeset 2417


Ignore:
Timestamp:
04/05/10 14:12:10 (14 years ago)
Author:
amuller
Message:

Ticket #1026 - Fechando a sessão em cada requisição do inicio do expressoMail

File:
1 edited

Legend:

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

    r2416 r2417  
    26162616                $mail->FromName = $_SESSION['phpgw_info']['expressomail']['user']['fullname']; 
    26172617                $mail->From =  $_SESSION['phpgw_info']['expressomail']['user']['email']; 
     2618                $session_id = $_SESSION[ 'phpgw_session' ][ 'session_id' ]; 
     2619                $max_resolution = $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['image_size']; 
     2620 
     2621                // Free others requests  
     2622                session_write_close();  
    26182623 
    26192624                $this->add_recipients("to", $toaddress, &$mail); 
     
    26722677                                } 
    26732678                                $tempDir = ini_get("session.save_path"); 
    2674                                 $file = "cidimage_".$_SESSION[ 'phpgw_session' ][ 'session_id' ].$cid_imgs[6][$j].".dat"; 
     2679                                $file = "cidimage_".$session_id.$cid_imgs[6][$j].".dat"; 
    26752680                                $f = fopen($tempDir.'/'.$file,"w"); 
    26762681                                fputs($f,$fileContent); 
     
    27312736                                        } 
    27322737                                        header('Content-type: image/jpeg'); 
    2733                                         $max_resolution = $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['image_size']; 
    27342738                                        $max_resolution = ($max_resolution==""?'65536':$max_resolution); 
    27352739                                        if ($width < $max_resolution && $height < $max_resolution){ 
     
    27482752                                        imagecopyresampled($image_new, $image_big, 0, 0, 0, 0, $new_width, $new_height, $width, $height); 
    27492753                                        $tmpDir = ini_get("session.save_path"); 
    2750                                         $_file = "/cidimage_".$_SESSION[ 'phpgw_session' ][ 'session_id' ].".dat"; 
     2754                                        $_file = "/cidimage_".$session_id.".dat"; 
    27512755                                        imagejpeg($image_new,$tmpDir.$_file, 85); 
    27522756                                        $mail->AddAttachment($tmpDir.$_file, $attach['name'], "base64", $this->get_file_type($tmpDir.$_file)); 
     
    27962800                if (!$return['append']) 
    27972801                        $return['append'] = imap_last_error(); 
    2798  
     2802         
     2803                session_start(); 
    27992804                return $return; 
    28002805        } 
Note: See TracChangeset for help on using the changeset viewer.