- Timestamp:
- 05/19/11 13:38:13 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.2.0.2/expressoMail1_2/inc/class.imap_functions.inc.php
r4436 r4457 1425 1425 $regs_found = array(); 1426 1426 $tags_found = @mb_eregi("<style\b[^>]*>(.*?)</style>", $body, $regs_found); 1427 $wrapper_class = 'ExpressoCssWrapper'.time();1428 1427 1429 1428 foreach ($regs_found as $block_found) { … … 1439 1438 $prefix = ".$wrapper_class "; 1440 1439 foreach ($css->css[41] as $key => $value) { 1441 //explode multiple selectors per block 1442 $selectors = explode(',', $key); 1443 foreach ($selectors as $selector) { 1444 if (ereg('\*', $key)) { 1445 //skip selecto '*' 1446 continue; 1447 } 1448 1449 $selector = eregi_replace('[^#\.]*body.*', '', $selector); 1450 $css->css[41][$prefix.trim($selector)] = $value; 1451 } 1440 //explode multiple selectors per block 1441 $selectors = explode(',', $key); 1442 1443 foreach ($selectors as $selector) { 1444 if (ereg('\*', $key)) { 1445 //skip selecto '*' 1446 continue; 1447 } 1448 1449 $selector = eregi_replace('[^#\.]*body.*', '', $selector); 1450 $css->css[41][$prefix.trim($selector)] = $value; 1451 } 1452 1452 unset($css->css[41][$key]); 1453 1453 } … … 2925 2925 $imagesParts[$value[6]] = $value[3]; 2926 2926 2927 //Build Forwarding Attachments!!! 2928 foreach($forwarding_attachments as $forwarding_attachment) 2927 //Build Forwarding Attachments!!! 2928 foreach($forwarding_attachments as $forwarding_attachment) 2929 2929 { 2930 2930 $file_description = unserialize(rawurldecode($forwarding_attachment)); 2931 2932 $file_description = array_values($file_description); 2933 foreach($file_description as $i => $descriptor){ 2934 $file_description[$i] = eregi_replace('\'*\'','',$descriptor); 2935 } 2936 $fileContent = $this->get_forwarding_attachment($file_description[0], $file_description[1], $file_description[3],$file_description[4]); 2937 $fileName = $file_description[2]; 2938 2939 $file_description[5] = strlen($fileContent); //Size of file 2940 $return_forward[] = $file_description; 2941 2942 $mail->AddStringAttachment($fileContent, $fileName, $file_description[4], $this->get_file_type($file_description[2])); 2931 $file_description = array_values($file_description); 2932 2933 foreach($file_description as $i => $descriptor){ 2934 $file_description[$i] = eregi_replace('\'*\'','',$descriptor); 2935 } 2936 $fileContent = $this->get_forwarding_attachment($file_description[0], $file_description[1], $file_description[3],$file_description[4]); 2937 $fileName = $file_description[2]; 2938 2939 $file_description[5] = strlen($fileContent); //Size of file 2940 $return_forward[] = $file_description; 2941 2942 $mail->AddStringAttachment($fileContent, $fileName, $file_description[4], $this->get_file_type($file_description[2])); 2943 2943 } 2944 2944 … … 3035 3035 if (array_key_exists("name", $_attachment)) 3036 3036 { 3037 //unset($return_files[$index]);3037 unset($return_files[$index]); 3038 3038 $return_files[$index] = $_attachment['name']."_SIZE_".$return_files[$index][1] = $_attachment['size']; 3039 3039 } 3040 3040 else 3041 3041 { 3042 //unset($return_files[$index]);3042 unset($return_files[$index]); 3043 3043 $return_files[$index] = $_attachment[2]."_SIZE_". $return_files[$index][1] = $_attachment[5]; 3044 3044 } … … 4103 4103 if($timestamp){ 4104 4104 $pdate = date_parse(date('r')); // pega a data atual do servidor (TODO: pegar a data da mensagem local) 4105 $file = $tempDir."imap_".$_SESSION[ 'phpgw_session' ][ 'session_id' ];4106 4105 $timestamp += $pdate['zone']*(60); //converte a data da mensagem para o fuso horário GMT 0. Isto é feito devido ao Expresso Mail armazenar a data no fuso horário GMT 0 e para exibi-la converte ela para o fuso horário local. 4107 4108 /* TODO: o diretorio /tmp deve ser substituido pelo diretorio temporario configurado no setup */4109 $file = "/tmp/sess_".$_SESSION[ 'phpgw_session' ][ 'session_id' ]; 4106 /* TODO: o diretorio /tmp deve ser substituido pelo diretorio temporario configurado no setup */ 4107 $file = "/tmp/sess_".$_SESSION[ 'phpgw_session' ][ 'session_id' ]; 4108 4110 4109 $f = fopen($file,"w"); 4111 4110 fputs($f,base64_encode($source)); 4112 fclose($f); 4113 4111 fclose($f); 4112 $command = "python ".$_SESSION['rootPatch']."/expressoMail1_2/imap.py ".escapeshellarg($imap_server)." ".escapeshellarg($imap_port)." ".escapeshellarg($username)." ".escapeshellarg($password)." ".escapeshellarg($timestamp)." ".escapeshellarg($folder)." ".escapeshellarg($file); 4114 4113 $return['command']=exec(escapeshellcmd($command)); 4115 4114 }else{
Note: See TracChangeset
for help on using the changeset viewer.