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

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

Location:
trunk/workflow/inc/report/includes/classes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/workflow/inc/report/includes/classes/FormularioUtil.class.php

    r5307 r7655  
    8888                $resu = pg_query($conn,$sql); 
    8989                if (pg_num_rows($resu)>0) { 
    90                 for ($x=0;$x<pg_num_rows($resu);$x++)  { 
     90                for ($x=0;$x<pg_num_rows($resu);++$x)  { 
    9191                    $arrSelectValues[pg_fetch_result($resu,$x,$id)] = pg_fetch_result($resu,$x,$value); 
    9292                } 
     
    111111                $resu = pg_query($conn,$sql);    
    112112                if (pg_num_rows($resu)>0) { 
    113                 for ($x=0;$x<pg_num_rows($resu);$x++)  { 
     113                for ($x=0;$x<pg_num_rows($resu);++$x)  { 
    114114                    $arrSelectChecks[] = array(pg_fetch_result($resu,$x,$oid), pg_fetch_result($resu,$x,$descricao), false); 
    115115                } 
     
    122122                $resu = pg_query($conn,$sql);    
    123123                if (pg_num_rows($resu)>0) { 
    124                 for ($x=0;$x<pg_num_rows($resu);$x++)  { 
     124                for ($x=0;$x<pg_num_rows($resu);++$x)  { 
    125125                    $arrSelectChecks[] = array(pg_fetch_result($resu,$x,$oid), pg_fetch_result($resu,$x,$descricao), false); 
    126126                } 
  • trunk/workflow/inc/report/includes/classes/Listagem.class.php

    r6413 r7655  
    13881388 
    13891389 
    1390             for ($qtd_reg = 1;$qtd_reg <= $qtd_registros; $qtd_reg++) { 
     1390            for ($qtd_reg = 1;$qtd_reg <= $qtd_registros; ++$qtd_reg) { 
    13911391 
    13921392                if ($this->_isarray) { 
     
    14581458                                                 if ($cntcheckspan) { 
    14591459                                                        if ($this->_temarquivocsv) { 
    1460                                                                 for ($j=1; $j<= $cntcheckspan; $j++) { 
     1460                                                                for ($j=1; $j<= $cntcheckspan; ++$j) { 
    14611461                                                                        if ($j == $cntcheckspan) { 
    14621462                                                                                $this->_txtarquivo .= $txtarquivotexto; 
     
    17291729 
    17301730                                if ($this->_temarquivocsv) { 
    1731                                 for ($j=1; $j<= $cntcheckspan; $j++) { 
     1731                                for ($j=1; $j<= $cntcheckspan; ++$j) { 
    17321732                                        if ($j == $cntcheckspan) { 
    17331733                                                $this->_txtarquivo .= $txtarquivotexto; 
     
    18031803                         if ($cntcheckspan) { 
    18041804                            if ($this->_temarquivocsv) { 
    1805                                 for ($j=1; $j<= $cntcheckspan; $j++) { 
     1805                                for ($j=1; $j<= $cntcheckspan; ++$j) { 
    18061806                                    if ($j == $cntcheckspan) { 
    18071807                                        $this->_txtarquivo .= $txtarquivotexto; 
     
    21582158    public function autoAdicionarColunas() { 
    21592159        $i = pg_num_fields($this->dados); 
    2160         for ($j = 0; $j < $i; $j++) { 
     2160        for ($j = 0; $j < $i; ++$j) { 
    21612161            $fieldname = pg_field_name($this->dados, $j); 
    21622162            $tipo = pg_field_type($this->dados, $j); 
  • trunk/workflow/inc/report/includes/classes/SqlParser.class.php

    r5307 r7655  
    118118    protected function getQuantidadeIfs($texto) { 
    119119        $qtd = 0; 
    120         for ($i = 0;  $i <= strlen($texto); $i++) { 
     120        for ($i = 0;  $i <= strlen($texto); ++$i) { 
    121121            if (strtolower(substr($texto,$i,3)) == "#if") { 
    122122                $qtd = $qtd + 1; 
     
    128128    protected function numerarCondicao($texto,$num) { 
    129129        $qtd = 0; 
    130         for ($i = 0;  $i <= strlen($texto); $i++) { 
     130        for ($i = 0;  $i <= strlen($texto); ++$i) { 
    131131            if (strtolower(substr($texto,$i,3)) == "#if") { 
    132132                $qtd = $qtd + 1; 
     
    134134                $condicoesfechadas = 0; 
    135135                if ($qtd == $num) { 
    136                     for ($j = $i+1;  $j <= strlen($texto); $j++) { 
     136                    for ($j = $i+1;  $j <= strlen($texto); ++$j) { 
    137137                         
    138138                        if ((strtolower(substr($texto,$j,5)) == "#/if#")) { 
Note: See TracChangeset for help on using the changeset viewer.