Changeset 5085 for sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.imap_functions.inc.php
- Timestamp:
- 09/11/11 09:16:08 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.imap_functions.inc.php
r4955 r5085 15 15 'import_msgs' => True, 16 16 'msgs_to_archive' => True, 17 'get_offset_gmt' => True 17 'get_offset_gmt' => True, 18 'get_msg_flags' => True 18 19 ); 19 20 … … 4145 4146 return($this->functions->CalculateDateOffset()); 4146 4147 } 4148 4149 //MailArchiver -> get message flags only, invoked at archive operation 4150 function get_msg_flags($args){ 4151 $msg_folder = $args['folder']; 4152 $msg_n = $args['msg_number']; 4153 4154 $arr_msg = explode(",", $msg_n); 4155 4156 for($i=0; $i<count($arr_msg); $i++){ 4157 4158 if(!$this->mbox || !is_resource($this->mbox)) 4159 $this->mbox = $this->open_mbox($msg_folder); 4160 4161 if(!is_resource($this->mbox)) 4162 return(false); 4163 4164 $header = @imap_headerinfo($this->mbox, imap_msgno($this->mbox, $arr_msg[$i]), 80, 255); 4165 4166 if (!is_object($header)) 4167 return false; 4168 4169 $taglist[$i]["msgid"] = $msg_n; 4170 $taglist[$i]["unseen"] = $header->Unseen; 4171 $taglist[$i]["recent"] = $header->Recent; 4172 $taglist[$i]["flagged"] = $header->Flagged; 4173 $taglist[$i]["draft"] = $header->Draft; 4174 $taglist[$i]["answered"] = $header->Answered; 4175 $taglist[$i]["deleted"] = $header->Deleted; 4176 4177 if($header->Answered =='A' && $header->Draft == 'X') 4178 $taglist[$i]['forwarded'] = 'F'; 4179 else 4180 $taglist[$i]['forwarded'] = ' '; 4181 4182 if($header->Flagged != "F" && $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_important_flag']) { 4183 $flag = preg_match('/importance *: *(.*)\r/i', 4184 imap_fetchheader($this->mbox, imap_msgno($this->mbox, $msg_number)) 4185 ,$importance); 4186 $taglist[$i]["flagged"] = $flag==0?false:strtolower($importance[1])=="high"?"F":false; 4187 } 4188 } 4189 4190 return $taglist; 4191 } 4147 4192 } 4148 4193 ?>
Note: See TracChangeset
for help on using the changeset viewer.