Changeset 5158 for trunk/expressoMail1_2/inc/class.imap_functions.inc.php
- Timestamp:
- 11/08/11 15:30:53 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r5134 r5158 1759 1759 $image['cid'] = eregi_replace("<", "", $image['cid']); 1760 1760 $image['cid'] = eregi_replace(">", "", $image['cid']); 1761 //if is Draft Ticket #12561762 $image['cid'] = str_replace("@localhost", "@prognus.org", $image['cid']);1763 $body = eregi_replace("<br/>", "", $body);1764 1761 1765 1762 $body = str_replace("src=\"cid:".$image['cid']."\"", " src=\"./inc/get_archive.php?msgFolder=$msg_folder&msgNumber=$msgno&indexPart=".$image['pid']."\" ", $body); … … 2091 2088 $msgs_in_the_server = $this->get_msgs($folder, $sort_box_type, $search_box_type, $sort_box_reverse,$msg_range_begin,$msg_range_end); 2092 2089 $msgs_in_the_server = array_keys($msgs_in_the_server); 2093 if(!count($msgs_in_the_server)) 2094 return array(); 2095 2090 2091 $num_msgs = (count($msgs_in_the_server) - imap_num_recent($this->mbox)); 2092 2093 $dif = ($params['msg_range_end'] - $params['msg_range_begin']) +1; 2094 if(!count($msgs_in_the_server)){ 2095 $msg_range_begin -= $dif; 2096 $msg_range_end -= $dif; 2097 $msgs_in_the_server = $this->get_msgs($folder, $sort_box_type, $search_box_type, $sort_box_reverse,$msg_range_begin,$msg_range_end); 2098 $msgs_in_the_server = array_keys($msgs_in_the_server); 2099 $num_msgs = NULL; 2100 $return['msg_range_begin'] = $msg_range_begin; 2101 $return['msg_range_end'] = $msg_range_end; 2102 } 2096 2103 $return['new_msgs'] = imap_num_recent($this->mbox); 2097 $num_msgs = (count($msgs_in_the_server) - imap_num_recent($this->mbox)); 2098 2104 2099 2105 $msgs_in_the_client = explode(",", $msgs_existent); 2100 2106 … … 2117 2123 $aux++; 2118 2124 } 2119 }else if($num_msgs < $msg_range_end && $return['new_msgs'] == 0 && count($msg_to_insert) > 0 ){2125 }else if($num_msgs < $msg_range_end && $return['new_msgs'] == 0 && count($msg_to_insert) > 0 && $msg_range_end == $dif){ 2120 2126 $return['tot_msgs'] = $num_msgs; 2121 2127 } 2122 2128 2129 if(!count($msgs_in_the_server)){ 2130 return Array(); 2131 } 2132 2123 2133 $msg_to_delete = array_diff($msgs_in_the_client, $msgs_in_the_server); 2124 2134 $msgs_to_exec = array(); … … 3217 3227 { 3218 3228 $cid = base_convert(microtime().$j, 10, 36); //Gera um cid 3219 $body = str_replace($cid_imgs[1][$j], '"cid:'.$cid.' @'.$_SESSION['phpgw_info']['expressomail']['server']['domain_name'].'"', $body ); //tira o src da imagem e coloca o cid, ele e concatenado com o domain do servidor por que a biblioteaca mime faz isso na hora de gerar o mime.3229 $body = str_replace($cid_imgs[1][$j], '"cid:'.$cid.'"', $body ); //tira o src da imagem e coloca o cid. 3220 3230 $count = strlen($cid_imgs[6][$j]); 3221 3231
Note: See TracChangeset
for help on using the changeset viewer.