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

    r7655 r7673  
    746746                $entry[0]['dn'] = strtolower($entry[0]['dn']); 
    747747                $sector_dn_array = explode(",", $entry[0]['dn']); 
    748                 for($i=1; $i<count($sector_dn_array); ++$i) 
     748        $sector_dn_array_count = count($sector_dn_array); 
     749                for($i=1; $i<$sector_dn_array_count; ++$i) 
    749750                        $sector_dn .= $sector_dn_array[$i] . ','; 
    750751                //Retira ultimo pipe. 
     
    844845                $entry[0]['dn'] = strtolower($entry[0]['dn']); 
    845846                $sector_dn_array = explode(",", $entry[0]['dn']); 
    846                 for($i=1; $i<count($sector_dn_array); ++$i) 
     847        $sector_dn_array_count = count($sector_dn_array); 
     848                for($i=1; $i<$sector_dn_array_count; ++$i) 
    847849                        $sector_dn .= $sector_dn_array[$i] . ','; 
    848850                //Retira ultimo pipe. 
     
    925927                $entry[0]['dn'] = strtolower($entry[0]['dn']); 
    926928                $sector_dn_array = explode(",", $entry[0]['dn']); 
    927                 for($i=1; $i<count($sector_dn_array); ++$i) 
     929        $sector_dn_array_count = count($sector_dn_array); 
     930                for($i=1; $i<$sector_dn_array_count; ++$i) 
    928931                        $sector_dn .= $sector_dn_array[$i] . ','; 
    929932                //Retira ultimo pipe. 
     
    10061009                $entry[0]['dn'] = strtolower($entry[0]['dn']); 
    10071010                $sector_dn_array = explode(",", $entry[0]['dn']); 
    1008                 for($i=1; $i<count($sector_dn_array); ++$i) 
     1011        $sector_dn_array_count = count($sector_dn_array); 
     1012                for($i=1; $i<$sector_dn_array_count; ++$i) 
    10091013                        $sector_dn .= $sector_dn_array[$i] . ','; 
    10101014                //Retira ultimo pipe. 
     
    10861090                $entry[0]['dn'] = strtolower($entry[0]['dn']); 
    10871091                $sector_dn_array = explode(",", $entry[0]['dn']); 
    1088                 for($i=1; $i<count($sector_dn_array); ++$i) 
     1092        $sector_dn_array_count = count($sector_dn_array); 
     1093                for($i=1; $i<$sector_dn_array_count; ++$i) 
    10891094                        $sector_dn .= $sector_dn_array[$i] . ','; 
    10901095                //Retira ultimo pipe. 
Note: See TracChangeset for help on using the changeset viewer.