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/jmessenger/inc/class.DataBaseIM.inc.php

    r7655 r7673  
    5757                $hostsJabber = unserialize($this->getHostsJabber()); 
    5858                $findHosts      = explode(":", $pItem['item']); 
    59                 $return = "";    
    60                  
    61                 for( $i = 0 ; $i < count($hostsJabber); ++$i ) 
     59                $return = ""; 
     60 
     61        $hostsJabber_count = count($hostsJabber); 
     62                for( $i = 0 ; $i < $hostsJabber_count; ++$i ) 
    6263                        if( $hostsJabber[$i]['org'] == $findHosts[0] && $hostsJabber[$i]['jabberName'] == $findHosts[1] ) 
    6364                        { 
     
    490491                $orgs = array(); 
    491492 
    492                 for( $i = 0 ; $i < count($posAll); ++$i ) 
     493        $posAll_count = count($posAll); 
     494                for( $i = 0 ; $i < $posAll_count; ++$i ) 
    493495                { 
    494496                        $pos = strpos($organization, ","); 
     
    628630                                        if( count($confHostsOrgs) > 0 ) 
    629631                                        { 
    630                                                 for( $i = 0; $i < count($confHostsOrgs); ++$i) 
     632                        $confHostsOrgs_count = count($confHostsOrgs); 
     633                                                for( $i = 0; $i < $confHostsOrgs_count; ++$i) 
    631634                                                        if( $confHostsOrgs[$i]['org'] == $hosts[0] && $confHostsOrgs[$i]['jabberName'] == $hosts[1]) 
    632635                                                                $key = $i;       
Note: See TracChangeset for help on using the changeset viewer.