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/reports/inc/class.ldap_functions.inc.php

    r7655 r7673  
    136136                                $entry[0]['dn'] = strtolower($entry[0]['dn']); 
    137137                                $sector_dn_array = explode(",", $entry[0]['dn']); 
    138                                 for($i=1; $i<count($sector_dn_array); ++$i) 
     138                $sector_dn_array_count = count($sector_dn_array); 
     139                                for($i=1; $i<$sector_dn_array_count; ++$i) 
    139140                                        $sector_dn .= $sector_dn_array[$i] . ','; 
    140141                                //Retira ultimo pipe. 
     
    268269                                $entry[0]['dn'] = strtolower($entry[0]['dn']); 
    269270                                $sector_dn_array = explode(",", $entry[0]['dn']); 
    270                                 for($i=1; $i<count($sector_dn_array); ++$i) 
     271                $sector_dn_array_count = count($sector_dn_array); 
     272                                for($i=1; $i<$sector_dn_array_count; ++$i) 
    271273                                        $sector_dn .= $sector_dn_array[$i] . ','; 
    272274                                //Retira ultimo pipe. 
     
    366368                                $entry[0]['dn'] = strtolower($entry[0]['dn']); 
    367369                                $sector_dn_array = explode(",", $entry[0]['dn']); 
    368                                 for($i=1; $i<count($sector_dn_array); ++$i) 
     370                $sector_dn_array_count = count($sector_dn_array); 
     371                                for($i=1; $i<$sector_dn_array_count; ++$i) 
    369372                                        $sector_dn .= $sector_dn_array[$i] . ','; 
    370373                                //Retira ultimo pipe. 
Note: See TracChangeset for help on using the changeset viewer.