Changeset 7655 for trunk/expressoMail1_2/inc/class.imap_functions.inc.php
- Timestamp:
- 12/14/12 14:30:35 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r7622 r7655 46 46 function imap_functions (){ 47 47 $this->init(); 48 } 49 48 } 49 50 50 function init(){ 51 51 $this->foldersLimit = $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['imap_max_folders'] ? $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['imap_max_folders'] : 20000; //Limit of folders (mailboxes) user can see … … 231 231 232 232 $return[$i] = $this->get_info_head_msg( $msg_number , $sample ); 233 $i++;233 ++$i; 234 234 } 235 235 … … 245 245 array('filter' => $filter, 'criteria' => array('deepness' => '2')) 246 246 ); 247 for($i=0; $i<count($sort_array_msg); $i++){247 for($i=0; $i<count($sort_array_msg); ++$i){ 248 248 if(!isset($return[$i]['msg_number'])) 249 249 continue; 250 250 251 251 $numFlags = count($followupflagged); 252 for($ii=0; $ii<$numFlags; $ii++){252 for($ii=0; $ii<$numFlags; ++$ii){ 253 253 if($return[$i]['msg_number'] == $followupflagged[$ii]['messageNumber']){ 254 254 $followupflag = Controller::read( array( 'concept' => 'followupflag', 'id' => $followupflagged[$ii]['followupflagId'] )); … … 259 259 } 260 260 $numLabels = count($labeleds); 261 for($ii=0; $ii<$numLabels; $ii++){261 for($ii=0; $ii<$numLabels; ++$ii){ 262 262 if($return[$i]['msg_number'] == $labeleds[$ii]['messageNumber']){ 263 263 $labels = Controller::read( array( 'concept' => 'label', 'id' => $labeleds[$ii]['labelId'])); … … 290 290 if($i <= ($msg_range_end-$msg_range_begin)) 291 291 $return[$i] = $temp; 292 $i++;292 ++$i; 293 293 } 294 294 } … … 518 518 $elements = imap_mime_header_decode($string); 519 519 520 for($i = 0;$i < count($elements); $i++)520 for($i = 0;$i < count($elements);++$i) 521 521 { 522 522 $charset = strtolower($elements[$i]->charset); … … 743 743 if(!in_array($each_id,$messages_not_to_copy)) { 744 744 array_push($ids,$each_id); 745 $cont++;745 ++$cont; 746 746 } 747 747 if($cont>=100) … … 786 786 $array_names_keys = array_keys($sorted_msgs); 787 787 788 for($i = 0; $i < count($sorted_msgs); $i++){788 for($i = 0; $i < count($sorted_msgs); ++$i){ 789 789 790 790 $new_params = array(); … … 1132 1132 $return['next_message'] = null; 1133 1133 }else{ 1134 for($i = 0; $i < count($msg_ids); $i++){1134 for($i = 0; $i < count($msg_ids); ++$i){ 1135 1135 if($msg_ids[$i] == $msg_number){ 1136 1136 $return['prev_message'] = $msg_ids[$i-1]; … … 2256 2256 $return['new_msgs'] += 1; 2257 2257 } 2258 $aux++;2258 ++$aux; 2259 2259 } 2260 2260 }else if(count($msg_to_insert) > 0 && $msgs_in_the_server && $msgs_in_the_client[0] != "" && $return['new_msgs'] == 0){ … … 2264 2264 $return['new_msgs'] += 1; 2265 2265 } 2266 $aux++;2266 ++$aux; 2267 2267 } 2268 2268 }else if($num_msgs < $msg_range_end && $return['new_msgs'] == 0 && count($msg_to_insert) > 0 && $msg_range_end == $dif){ … … 2298 2298 2299 2299 $return[$i]['msg_folder'] = $folder; 2300 $i++;2300 ++$i; 2301 2301 } 2302 2302 $return['quota'] = $this->get_quota(array('folder_id' => $folder)); … … 2366 2366 { 2367 2367 $principals = array(); 2368 for($x = 0; $x < 5 ; $x++)2368 for($x = 0; $x < 5 ; ++$x) 2369 2369 { 2370 2370 switch ($x) { … … 2559 2559 }else{ 2560 2560 $child = $base_path.$this->imap_delimiter; 2561 for($i =0; $i < count($test); $i++){2561 for($i =0; $i < count($test); ++$i){ 2562 2562 $child .= ($test[$i] ? $test[$i] : $this->functions->getLang("New Folder")); 2563 2563 $namebox = mb_convert_encoding($child, "UTF7-IMAP", "UTF-8"); … … 3118 3118 foreach ($size_rule_by_group as $i => $value) { 3119 3119 if (is_array($value[0])) { 3120 $n_rule_groups++;3120 ++$n_rule_groups; 3121 3121 if ($value[0]['email_max_recipient'] > $maior_valor_regra_grupo) 3122 3122 $maior_valor_regra_grupo = $value[0]['email_max_recipient']; … … 3654 3654 return $returns; 3655 3655 }else{ 3656 for($i = 0; $i < count($array_names_keys); $i++){3656 for($i = 0; $i < count($array_names_keys); ++$i){ 3657 3657 $param['folder'] = $array_names_keys[$i]; 3658 3658 $param['msgs_to_set'] = $sorted_msgs[$array_names_keys[$i]]; … … 4088 4088 $return[$j][$i]['attachment'] = $imap_attachment->get_attachment_headerinfo($mbox_stream, $msg_number); 4089 4089 4090 $i++;4091 } 4092 $j++;4090 ++$i; 4091 } 4092 ++$j; 4093 4093 if($mbox_stream) 4094 4094 imap_close($mbox_stream); … … 4142 4142 $temp['msg_folder'] = $folder['folder_id']; 4143 4143 $return["msgs"][$num_msgs] = $temp; 4144 $num_msgs++;4144 ++$num_msgs; 4145 4145 } 4146 4146 … … 4564 4564 //$array_parts_attachments['names'] .= $array_parts_attachments[$i]['name'] . ', '; 4565 4565 $array_parts_attachments[$i]['fsize'] = $msg->fsize[$msgno][$index]; 4566 $i++;4566 ++$i; 4567 4567 } 4568 4568 } … … 5067 5067 $return['msgs'][$i]['boxname'] = $folder; 5068 5068 $return['msgs'][$i]['uid'] = $v; 5069 $i++;5069 ++$i; 5070 5070 } 5071 5071 } … … 5104 5104 foreach ($return['msgs'] as $v) 5105 5105 { 5106 $k++;5106 ++$k; 5107 5107 if($k < $ini || $k >= $end ) continue; 5108 5108 $nMsgs[] = $v; … … 5289 5289 // foreach ($rrr as $v) 5290 5290 // { 5291 // $k++;5291 // ++$k; 5292 5292 // if( $k < $ini || $k >= $end ) continue; 5293 5293 // $r[] = $v; … … 5562 5562 $arr_msg = explode(",", $msg_n); 5563 5563 5564 for($i=0; $i<count($arr_msg); $i++){5564 for($i=0; $i<count($arr_msg); ++$i){ 5565 5565 5566 5566 if(!$this->mbox || !is_resource($this->mbox))
Note: See TracChangeset
for help on using the changeset viewer.