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/common_functions.inc.php

    r6057 r7655  
    208208                /* the default values                                          */ 
    209209                $num = count($expected); 
    210                 for ($i = 0; $i < $num; $i++) 
     210                for ($i = 0; $i < $num; ++$i) 
    211211                { 
    212212                        $args[$expected[$i]['name']] = $expected[$i]['default']; 
     
    224224                        if(!is_array($recieved[0])) 
    225225                        { 
    226                         for ($i = 0; $i < $num; $i++) 
     226                        for ($i = 0; $i < $num; ++$i) 
    227227                                { 
    228228                                        if(isset($recieved[$i]) && $recieved[$i] !== '##DEFAULT##') 
     
    244244                        else 
    245245                        { 
    246                                 for ($i = 0; $i < $num; $i++) 
     246                                for ($i = 0; $i < $num; ++$i) 
    247247                                { 
    248248                                        $types[$expected[$i]['name']] = $expected[$i]['type'];  
     
    342342                                { 
    343343                                        $octets = preg_split('/\./',$string); 
    344                                         for ($i=0; $i != count($octets); $i++) 
     344                                        for ($i=0; $i != count($octets); ++$i) 
    345345                                        { 
    346346                                                if ($octets[$i] < 0 || $octets[$i] > 255) 
     
    408408                                if ($password_length >= $min_length) 
    409409                                { 
    410                                         for ($i=0; $i != $password_length; $i++) 
     410                                        for ($i=0; $i != $password_length; ++$i) 
    411411                                        { 
    412412                                                $cur_test_string = substr($string, $i, 1); 
     
    475475                } 
    476476                $cnt = count($method); 
    477                 for($i=0;$i<$cnt;$i++) 
     477                for($i=0;$i<$cnt;++$i) 
    478478                { 
    479479                        switch(strtoupper($method[$i])) 
     
    730730            $kl=strlen($ky)<32?strlen($ky):32; 
    731731            $k=array(); 
    732             for($i=0;$i<$kl;$i++) 
     732            for($i=0;$i<$kl;++$i) 
    733733                { 
    734734                    $k[$i]=ord($ky{$i})&0x1F; 
    735735                } 
    736736            $j=0; 
    737             for($i=0;$i<strlen($str);$i++) 
     737            for($i=0;$i<strlen($str);++$i) 
    738738                { 
    739739                    $e=ord($str{$i}); 
    740740                    $str{$i}=$e&0xE0?chr($e^$k[$j]):chr($e); 
    741                     $j++;$j=$j==$kl?0:$j; 
     741                    ++$j;$j=$j==$kl?0:$j; 
    742742                } 
    743743            return $str; 
     
    814814                                                $code .= '$p' . $i . ','; 
    815815                                        } 
    816                                         $i++; 
     816                                        ++$i; 
    817817                                } 
    818818                                $code = substr($code,0,-1) . ');'; 
     
    10831083                $less = 0; 
    10841084 
    1085                 for ($i=0;$i<count($testa);$i++) 
     1085                for ($i=0;$i<count($testa);++$i) 
    10861086                { 
    10871087                        if ($DEBUG) { echo'<br>Checking if '. (int)$testa[$i] . ' is less than ' . (int)$testb[$i] . ' ...'; } 
     
    10891089                        { 
    10901090                                if ($DEBUG) { echo ' yes.'; } 
    1091                                 $less++; 
     1091                                ++$less; 
    10921092                                if ($i<3) 
    10931093                                { 
     
    11631163                $less = 0; 
    11641164 
    1165                 for ($i=0;$i<count($testa);$i++) 
     1165                for ($i=0;$i<count($testa);++$i) 
    11661166                { 
    11671167                        if ($DEBUG) { echo'<br>Checking if '. (int)$testa[$i] . ' is more than ' . (int)$testb[$i] . ' ...'; } 
     
    11691169                        { 
    11701170                                if ($DEBUG) { echo ' yes.'; } 
    1171                                 $less++; 
     1171                                ++$less; 
    11721172                                if ($i<3) 
    11731173                                { 
Note: See TracChangeset for help on using the changeset viewer.