- Timestamp:
- 07/09/12 15:23:03 (12 years ago)
- Location:
- sandbox/2.4.2-expresso3/expressoMail1_2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.4.2-expresso3/expressoMail1_2/inc/class.exporteml.inc.php
r5934 r6745 16 16 var $mbox_stream; 17 17 var $tempDir; 18 18 19 19 function ExportEml() { 20 20 … … 214 214 // se encontram em um mesmo folder 215 215 if (count($sorted_msgs)==1){ 216 217 216 $array_names_keys = array_keys($sorted_msgs); 218 217 $this->folder = mb_convert_encoding($array_names_keys[0], "UTF7-IMAP","UTF-8, ISO-8859-1, UTF7-IMAP"); … … 228 227 $fileName = $this->CreateFileEml($sEMLData, $tempDir, $msg_number[0]."_".$_SESSION[ 'phpgw_session' ][ 'session_id' ]); 229 228 230 229 $header = imap_headerinfo($this->mbox_stream, imap_msgno($this->mbox_stream, $msg_number[0]), 80, 255); 230 $subject = $this->decode_subject($header->fetchsubject); 231 231 232 imap_close($this->mbox_stream); 232 233 if (!$fileName) { 233 234 return false; 234 235 }else{ 235 return $tempDir.'/'.$fileName; 236 $return = array(); 237 $return[] = $tempDir.'/'.$fileName; 238 $return[] = $subject; 239 return $return; 236 240 } 237 241 } … … 271 275 } 272 276 273 return $file; 277 return $file; 274 278 275 279 //exporta mensagens de diferentes pastas … … 362 366 $file = false; 363 367 } 364 365 368 return $file; 366 369 … … 369 372 { 370 373 $this-> folder = $params['folder']; 371 374 $this->folder = mb_convert_encoding($this->folder, "UTF7-IMAP","UTF-8, ISO-8859-1, UTF7-IMAP"); 372 375 $array_ids = explode(',', $params['msgs_to_export']); 373 376 $error = False; … … 383 386 $sEMLData = $this->parseEml($header, $body); 384 387 $fileName = $this->CreateFileEml($sEMLData, $tempDir, $array_ids[0]."_".$_SESSION[ 'phpgw_session' ][ 'session_id' ]); 388 389 $header = imap_headerinfo($this->mbox_stream, imap_msgno($this->mbox_stream, $array_ids[0]), 80, 255); 390 $subject = $this->decode_subject($header->fetchsubject); 385 391 386 392 imap_close($this->mbox_stream); … … 388 394 return false; 389 395 } else { 390 return $tempDir.'/'.$fileName; 396 $return = array(); 397 $return[] = $tempDir.'/'.$fileName; 398 $return[] = $subject; 399 return $return; 391 400 } 392 401 } … … 424 433 $file = false; 425 434 } 426 427 435 return $file; 428 436 } … … 453 461 $fileName = $this->CreateFileEml($sEMLData, $tempDir, $array_ids[0]."_".$_SESSION[ 'phpgw_session' ][ 'session_id' ]); 454 462 463 $header = imap_headerinfo($this->mbox_stream, imap_msgno($this->mbox_stream, $array_ids[0]), 80, 255); 464 $subject = $this->decode_subject($header->fetchsubject); 465 455 466 imap_close($this->mbox_stream); 456 467 if (!$fileName) { 457 468 return false; 458 469 } else { 459 return $tempDir.'/'.$fileName; 470 $return = array(); 471 $return[] = $tempDir.'/'.$fileName; 472 $return[] = $subject; 473 return $return; 460 474 } 461 475 } -
sandbox/2.4.2-expresso3/expressoMail1_2/js/common_functions.js
r6707 r6745 825 825 var num_msg = id_msg.substr(0,(id_msg.length - 2)); 826 826 var handler_source = function(data){ 827 download_attachments(null, null, data , null,null,'fonte_da_mensagem.eml');827 download_attachments(null, null, data[0], null,null,data[1]+'.eml'); 828 828 } 829 829 cExecute("$this.exporteml.export_msg",handler_source,"folder="+url_decode(folder)+"&msgs_to_export="+num_msg); -
sandbox/2.4.2-expresso3/expressoMail1_2/js/main.js
r6721 r6745 3485 3485 else{ 3486 3486 var filename = 'mensagens.zip'; 3487 if (data .match(/\.eml$/gi)) {3488 filename = 'fonte_da_mensagem.eml';3487 if (data[0].match(/\.eml$/gi)) { 3488 filename = data[1]+'.eml'; 3489 3489 } 3490 3490 download_attachments(null, null, data, null,null,filename);
Note: See TracChangeset
for help on using the changeset viewer.