Ignore:
Timestamp:
12/14/12 14:30:35 (11 years ago)
Author:
douglasz
Message:

Ticket #3236 - Melhorias de performance no codigo do Expresso.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/inc/class.gdgraph.inc.php

    r2 r7655  
    119119                        // Draw dashed lines for x axis 
    120120                        $linespace = ($this->graph_width - $this->margin_left - $this->margin_right) / ($this->num_lines_x - 1); 
    121                         for ($i = 1; $i < $this->num_lines_x; $i++) 
     121                        for ($i = 1; $i < $this->num_lines_x; ++$i) 
    122122                        { 
    123123                                $x = $i * $linespace + $this->margin_left; 
     
    130130                        // Draw dashed lines for y axis 
    131131                        $linespace = ($this->graph_height - $this->margin_top - $this->margin_bottom) / ($this->num_lines_y - 1); 
    132                         for ($i = 1; $i < $this->num_lines_y; $i++) 
     132                        for ($i = 1; $i < $this->num_lines_y; ++$i) 
    133133                        { 
    134134                                $y = $this->graph_height - $this->margin_bottom - ($i * $linespace); 
     
    174174                                $this->img->MoveTo($i * $linespace + $this->margin_left, $this->graph_height - $this->margin_bottom + 8); 
    175175                                $this->img->DrawText(array('text' => $text['date_formatted'])); 
    176                                 $i++; 
     176                                ++$i; 
    177177                        } 
    178178 
     
    223223                                        } 
    224224 
    225                                         for($y=0;$y<$largest;$y++) 
     225                                        for($y=0;$y<$largest;++$y) 
    226226                                        { 
    227227                                                if($line['sdate'] == $this->line_captions_x[$y]['date']) 
     
    249249                                elseif($line['edate'] <= $this->line_captions_x[$largest]['date'] && $line['edate'] >= $this->line_captions_x[0]['date']) 
    250250                                { 
    251                                         for($y=0;$y<$largest;$y++) 
     251                                        for($y=0;$y<$largest;++$y) 
    252252                                        { 
    253253                                                if($line['edate'] == $this->line_captions_x[$y]['date']) 
     
    262262                                } 
    263263 
    264                                 for ($w = -3; $w < 4; $w++) 
     264                                for ($w = -3; $w < 4; ++$w) 
    265265                                { 
    266266                                        $this->img->Line(1+$x1,$y1+$w,$x2,$y2+$w); 
    267267                                } 
    268                                 $color_index++; 
    269                                 $i++; 
     268                                ++$color_index; 
     269                                ++$i; 
    270270                        } 
    271271                        // Draw the y axis text 
     
    274274                        $linespace = ($this->graph_height - $this->margin_top - $this->margin_bottom) / ($this->num_lines_y - 1); 
    275275                        $space = 1; 
    276                         for ($i = 0;$i<count($this->data);$i++) 
     276                        for ($i = 0;$i<count($this->data);++$i) 
    277277                        { 
    278278                                $y = $this->graph_height - $this->margin_bottom - ($space * $linespace) - 7; 
    279279                                $this->img->MoveTo($this->margin_left - 6, $y); 
    280280                                $this->img->DrawText(array('text' => $this->data[$i]['title'],'justification' => 'right','margin_left' => $this->margin_left)); 
    281                                 $space++; 
     281                                ++$space; 
    282282                        } 
    283283 
Note: See TracChangeset for help on using the changeset viewer.