Changeset 7184 for sandbox/2.5.0-expresso1
- Timestamp:
- 09/10/12 12:05:54 (12 years ago)
- Location:
- sandbox/2.5.0-expresso1/expressoMail1_2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.5.0-expresso1/expressoMail1_2/inc/class.imap_functions.inc.php
r7157 r7184 5444 5444 return($this->functions->CalculateDateOffset()); 5445 5445 } 5446 5446 5447 5447 //MailArchiver -> get message flags only, invoked at archive operation 5448 //Marcosw início - modificação da estrutura da função, removendo estr. de repetição desnecessária 5448 5449 function get_msg_flags($args){ 5449 5450 $msg_folder = $args['folder']; 5450 5451 $msg_n = $args['msg_number']; 5451 5452 5452 $arr_msg = explode(",", $msg_n); 5453 5454 for($i=0; $i<count($arr_msg); $i++){ 5455 5456 if(!$this->mbox || !is_resource($this->mbox)) 5457 $this->mbox = $this->open_mbox($msg_folder); 5458 5459 if(!is_resource($this->mbox)) 5460 return(false); 5461 5462 $header = @imap_headerinfo($this->mbox, imap_msgno($this->mbox, $arr_msg[$i]), 80, 255); 5463 5464 if (!is_object($header)) 5465 return false; 5466 5467 $taglist[$i]["msgid"] = $msg_n; 5468 $taglist[$i]["unseen"] = $header->Unseen; 5469 $taglist[$i]["recent"] = $header->Recent; 5470 $taglist[$i]["flagged"] = $header->Flagged; 5471 $taglist[$i]["draft"] = $header->Draft; 5472 $taglist[$i]["answered"] = $header->Answered; 5473 $taglist[$i]["deleted"] = $header->Deleted; 5474 5475 if($header->Answered =='A' && $header->Draft == 'X') 5476 $taglist[$i]['forwarded'] = 'F'; 5477 else 5478 $taglist[$i]['forwarded'] = ' '; 5479 5480 if($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_important_flag']) { 5481 $flag = preg_match('/importance *: *(.*)\r/i',imap_fetchheader($this->mbox, imap_msgno($this->mbox, $arr_msg[$i])),$importance); 5482 $taglist[$i]["importance"] = $flag==0?"Normal":$importance[1]; 5483 } 5453 if(!$this->mbox || !is_resource($this->mbox)) 5454 $this->mbox = $this->open_mbox($msg_folder); 5455 5456 if(!is_resource($this->mbox)) 5457 return(false); 5458 5459 $a = imap_msgno($this->mbox, $msg_n); 5460 $header = @imap_headerinfo($this->mbox, $a, 80, 255); 5461 5462 if (!is_object($header)) 5463 return false; 5464 5465 $taglist["msgid"] = $msg_n; 5466 $taglist["unseen"] = $header->Unseen; 5467 $taglist["recent"] = $header->Recent; 5468 $taglist["flagged"] = $header->Flagged; 5469 $taglist["draft"] = $header->Draft; 5470 $taglist["answered"] = $header->Answered; 5471 $taglist["deleted"] = $header->Deleted; 5472 5473 if($header->Answered =='A' && $header->Draft == 'X') 5474 $taglist['forwarded'] = 'F'; 5475 else 5476 $taglist['forwarded'] = ' '; 5477 5478 if($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_important_flag']) { 5479 $flag = preg_match('/importance *: *(.*)\r/i',imap_fetchheader($this->mbox, imap_msgno($this->mbox, $msg_n)),$importance); 5480 $taglist["importance"] = $flag==0?"Normal":$importance[1]; 5484 5481 } 5482 5485 5483 return $taglist; 5486 5484 } 5485 // Marcosw fim 5487 5486 /* Airton 5488 5487 * Fim dos métodos -
sandbox/2.5.0-expresso1/expressoMail1_2/js/mail_archiver.js
r7183 r7184 527 527 } 528 528 else{ 529 document.getElementById('main_title').innerHTML = get_lang("All done. End of archive messages operation"); 529 //document.getElementById('main_title').innerHTML = get_lang("All done. End of archive messages operation"); 530 //Marcosw inicio - Melhoria na exibição de mensagem 531 write_msg(get_lang("All done. End of archive messages operation")); 532 //Marcosw fim 530 533 expresso_mail_archive.resetObject(); 531 534 expresso_mail_archive.archivefolder = null; -
sandbox/2.5.0-expresso1/expressoMail1_2/js/main.js
r7183 r7184 1595 1595 1596 1596 /* function archive_msgs(folder,folder_dest,id_msgs) { 1597 write_msg(get_lang('Starting to archive messages')); 1598 1599 if(currentTab.toString().indexOf("_r") != -1){ 1600 id_msgs = currentTab.toString().substr(0,currentTab.toString().indexOf("_r")); 1601 } 1602 1603 if(!id_msgs) 1604 id_msgs = get_selected_messages(); 1605 1606 if(folder_dest=='local_root' || folder_dest==null)//Default archive destiny = local_inbox folder 1607 folder_dest = 'local_inbox'; 1608 1609 if (parseInt(id_msgs) > 0 || id_msgs.length > 0){ 1610 expresso_mail_archive.Archive(folder,folder_dest,id_msgs); 1611 } 1612 else 1613 write_msg(get_lang('No selected message.')); 1614 1615 1616 1617 /* 1597 1618 if(proxy_mensagens.is_local_folder(folder)) { 1598 1619 write_msg(get_lang("You cant archive local mails")); … … 1631 1652 var handler_arquivar_mensagens = function(data) { 1632 1653 1633 var msgs_info = [];1654 //var msgs_info = []; 1634 1655 1635 for( var i = 0; i < data.length; i++ )1636 msgs_info[i] = connector.unserialize( data[i] );1656 //for( var i = 0; i < data.length; i++ ) 1657 //msgs_info[i] = connector.unserialize( data[i] ); 1637 1658 1638 1659 //vejo se já tinha mensagens locais 1639 var h = expresso_local_messages.has_local_mails();1660 //var h = expresso_local_messages.has_local_mails(); 1640 1661 1641 expresso_local_messages.insert_mails( msgs_info, folder_dest, function( s, f ){complete_archiving( s, f, h )} ); 1642 1662 //expresso_local_messages.insert_mails( msgs_info, folder_dest, function( s, f ){complete_archiving( s, f, h )} ); 1663 1664 expresso_mail_archive.Archive(folder,folder_dest,id_msgs); 1643 1665 document.getElementById("overlay").style.visibility = "hidden"; 1644 1666 }
Note: See TracChangeset
for help on using the changeset viewer.