Changeset 7673 for trunk/reports


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

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

Location:
trunk/reports/inc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/reports/inc/class.fpdf.inc.php

    r7655 r7673  
    15891589                { 
    15901590                        $trns=''; 
    1591                         for($i=0;$i<count($info['trns']);++$i) 
     1591            $info_trns_count = count($info['trns']); 
     1592                        for($i=0;$i<$info_trns_count;++$i) 
    15921593                                $trns.=$info['trns'][$i].' '.$info['trns'][$i].' '; 
    15931594                        $this->_out('/Mask ['.$trns.']'); 
  • 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. 
  • trunk/reports/inc/class.uireports_fpdf.inc.php

    r7655 r7673  
    3838                //Calculate the height of the row 
    3939                $nb=0; 
    40                 for($i=0;$i< count($data);++$i) 
     40        $data_count = count($data); 
     41                for($i=0;$i< $data_count;++$i) 
    4142                $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i])); 
    4243                $h=5*$nb; 
     
    4445                $this->CheckPageBreak($h); 
    4546                //Draw the cells of the row 
    46                 for($i=0;$i< count($data);++$i) 
     47        $data_count = count($data); 
     48                for($i=0;$i< $data_count;++$i) 
    4749                { 
    4850                        $w=$this->widths[$i]; 
Note: See TracChangeset for help on using the changeset viewer.