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/jabberit_messenger/inc/class.db_im.inc.php

    r7655 r7673  
    5858                $hostsJabber = unserialize($this->getHostsJabber()); 
    5959                $findHosts      = explode(":", $pItem['item']); 
    60                 $return = "";    
    61                  
    62                 for( $i = 0 ; $i < count($hostsJabber); ++$i ) 
     60                $return = ""; 
     61 
     62        $hostsJabber_count = count($hostsJabber); 
     63                for( $i = 0 ; $i < $hostsJabber_count; ++$i ) 
    6364                        if( $hostsJabber[$i]['org'] == $findHosts[0] && $hostsJabber[$i]['jabberName'] == $findHosts[1] ) 
    6465                        { 
     
    517518                $orgs = array(); 
    518519 
    519                 for( $i = 0 ; $i < count($posAll); ++$i ) 
     520        $posAll_count = count($posAll); 
     521                for( $i = 0 ; $i < $posAll_count; ++$i ) 
    520522                { 
    521523                        $pos = strpos($organization, ","); 
     
    655657                                        if( count($confHostsOrgs) > 0 ) 
    656658                                        { 
    657                                                 for( $i = 0; $i < count($confHostsOrgs); ++$i) 
     659                        $confHostsOrgs_count = count($confHostsOrgs); 
     660                                                for( $i = 0; $i < $confHostsOrgs_count; ++$i) 
    658661                                                        if( $confHostsOrgs[$i]['org'] == $hosts[0] && $confHostsOrgs[$i]['jabberName'] == $hosts[1]) 
    659662                                                                $key = $i;       
Note: See TracChangeset for help on using the changeset viewer.