Ignore:
Timestamp:
12/18/12 16:15:29 (11 years ago)
Author:
douglasz
Message:

Ticket #3236 - Correcoes para Performance: Function Within Loop Declaration.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/class.imap_functions.inc.php

    r7655 r7673  
    245245                                                                array('filter' => $filter, 'criteria' => array('deepness' => '2')) 
    246246                                                        ); 
    247                                                         for($i=0; $i<count($sort_array_msg); ++$i){ 
     247                            $sort_array_msg_count = count($sort_array_msg); 
     248                                                        for($i=0; $i<$sort_array_msg_count; ++$i){ 
    248249                                                                if(!isset($return[$i]['msg_number'])) 
    249250                                                                        continue; 
     
    518519                        $elements = imap_mime_header_decode($string); 
    519520 
    520                         for($i = 0;$i < count($elements);++$i) 
     521            $elements_count = count($elements); 
     522                        for($i = 0;$i < $elements_count;++$i) 
    521523                        { 
    522524                                $charset = strtolower($elements[$i]->charset); 
     
    785787                        $return = array(); 
    786788                        $array_names_keys = array_keys($sorted_msgs); 
    787                          
    788                         for($i = 0; $i < count($sorted_msgs); ++$i){ 
     789 
     790            $sorted_msgs_count = count($sorted_msgs); 
     791                        for($i = 0; $i < $sorted_msgs_count; ++$i){ 
    789792                         
    790793                                $new_params = array(); 
     
    25592562                }else{ 
    25602563                        $child = $base_path.$this->imap_delimiter; 
    2561                         for($i =0; $i < count($test); ++$i){ 
     2564            $test_count = count($test); 
     2565                        for($i =0; $i < $test_count; ++$i){ 
    25622566                                $child .= ($test[$i] ? $test[$i] : $this->functions->getLang("New Folder")); 
    25632567                                $namebox =  mb_convert_encoding($child, "UTF7-IMAP", "UTF-8"); 
     
    36543658                        return $returns; 
    36553659                }else{ 
    3656                         for($i = 0; $i < count($array_names_keys); ++$i){ 
     3660            $array_names_keys_count = count($array_names_keys); 
     3661                        for($i = 0; $i < $array_names_keys_count; ++$i){ 
    36573662                                $param['folder'] = $array_names_keys[$i]; 
    36583663                                $param['msgs_to_set'] = $sorted_msgs[$array_names_keys[$i]]; 
Note: See TracChangeset for help on using the changeset viewer.