Changeset 1247 for trunk/expressoMail1_2/inc/class.imap_functions.inc.php
- Timestamp:
- 08/03/09 10:09:55 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r1246 r1247 60 60 // This error is returned from Postfix. 61 61 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).')); 63 63 } 64 64 elseif(strstr($error,'virus')) { … … 210 210 return $this->htmlspecialchars_encode($string); 211 211 } 212 213 212 /** 214 213 * Função que importa arquivos .eml exportados pelo expresso para a caixa do usuário. Testado apenas … … 1630 1629 $body = $params['body']; 1631 1630 } 1631 //echo "<script language=\"javascript\">javascript:alert('".$body."');</script>"; 1632 1632 $attachments = $params['FILES']; 1633 1633 $forwarding_attachments = $params['forwarding_attachments']; … … 1803 1803 } 1804 1804 $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"; 1806 1806 $f = fopen($tempDir.'/'.$file,"w"); 1807 1807 fputs($f,$fileContent); … … 1818 1818 { 1819 1819 $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; 1821 1821 foreach ($attachments as $attach) 1822 1822 { … … 1824 1824 $total_uploaded_size = $total_uploaded_size + $attach['size']; 1825 1825 } 1826 if( $total_uploaded_size > $upload_max_filesize) 1826 if( $total_uploaded_size > $upload_max_filesize) 1827 1827 return $this->parse_error("message file too big"); 1828 1828 } … … 2315 2315 } 2316 2316 $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"; 2318 2318 $f = fopen($tempDir.'/'.$file,"w"); 2319 2319 fputs($f,$fileContent); … … 2366 2366 case 3: $image_big = imagecreatefrompng($attach['tmp_name']); break; 2367 2367 case 6: 2368 include_once("gd_functions.php");2368 require_once("gd_functions.php"); 2369 2369 $image_big = imagecreatefrombmp($attach['tmp_name']); break; 2370 2370 default: … … 2390 2390 imagecopyresampled($image_new, $image_big, 0, 0, 0, 0, $new_width, $new_height, $width, $height); 2391 2391 $tmpDir = ini_get("session.save_path"); 2392 $_file = "cidimage_".$ GLOBALS['phpgw']->session->sessionid.".dat";2392 $_file = "cidimage_".$_SESSION[ 'phpgw_session' ][ 'session_id' ].".dat"; 2393 2393 imagejpeg($image_new,$tmpDir.$_file, 85); 2394 2394 $mail->AddAttachment($tmpDir.$_file, $attach['name'], "base64", $this->get_file_type($tmpDir.$_file)); … … 3263 3263 if($timestamp){ 3264 3264 $tempDir = ini_get("session.save_path"); 3265 $file = $tempDir."imap_".$ GLOBALS['phpgw']->session->sessionid;3265 $file = $tempDir."imap_".$_SESSION[ 'phpgw_session' ][ 'session_id' ]; 3266 3266 $f = fopen($file,"w"); 3267 3267 fputs($f,base64_encode($source));
Note: See TracChangeset
for help on using the changeset viewer.