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/local/classes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/workflow/inc/local/classes/class.wf_crypt.php

    r795 r7655  
    6363                $iv = $this->_generate_iv();             
    6464                $out = '';               
    65                 for($c=0;$c < $this->hash_length;$c++) { 
     65                for($c=0;$c < $this->hash_length;++$c) { 
    6666                        $out .= chr(ord($iv[$c]) ^ ord($this->hash_key[$c])); 
    6767                } 
     
    7373                        } 
    7474                        $out .= chr(ord($key[$c % $this->hash_length]) ^ ord($string[$c])); 
    75                         $c++; 
     75                        ++$c; 
    7676                } 
    7777                if($this->base64) $out = base64_encode($out); 
     
    9090                $string = substr($string,$this->hash_length,strlen($string) - $this->hash_length); 
    9191                $iv = $out = ''; 
    92                 for($c=0;$c < $this->hash_length;$c++) { 
     92                for($c=0;$c < $this->hash_length;++$c) { 
    9393                        $iv .= chr(ord($tmp_iv[$c]) ^ ord($this->hash_key[$c])); 
    9494                } 
     
    100100                        } 
    101101                        $out .= chr(ord($key[$c % $this->hash_length]) ^ ord($string[$c])); 
    102                         $c++; 
     102                        ++$c; 
    103103                } 
    104104                return $out; 
  • trunk/workflow/inc/local/classes/class.wf_date.php

    r5921 r7655  
    213213                // Adiciona os anos 
    214214                $years = intval($years); 
    215                 for ($i = 1; $i <= $years; $i++) { 
    216                         $year++; 
     215                for ($i = 1; $i <= $years; ++$i) { 
     216                        ++$year; 
    217217                        $daysInc += ($this->isLeapYear($year)) ? 366 : 365; 
    218218                } 
    219219                // Adiciona os meses de acordo com o número de dias em cada um 
    220220                $months = intval($months); 
    221                 for ($i = 1; $i <= $months; $i++) { 
     221                for ($i = 1; $i <= $months; ++$i) { 
    222222                        $mTemp = $i % 12 - 1; 
    223223                        $yTemp = intval($i / 12); 
    224224                        if (($month + $mTemp) > 12) { 
    225                                 $yTemp++; 
     225                                ++$yTemp; 
    226226                                $mTemp = ($month + $mTemp) - 12; 
    227227                        } else { 
     
    286286                $daysDec = 0; 
    287287                // Adiciona os anos 
    288                 for ($i = 1; $i <= $years; $i++) { 
     288                for ($i = 1; $i <= $years; ++$i) { 
    289289                        $s = ($this->isLeapYear($year)) ? 366 : 365; 
    290290                        $daysDec += ($this->isLeapYear($year)) ? 366 : 365; 
     
    292292                }                
    293293                // Adiciona os meses de acordo com os dias de cada mês 
    294                 for ($i = 1; $i <= $months; $i++) { 
     294                for ($i = 1; $i <= $months; ++$i) { 
    295295                        $mTemp = $i % 12; 
    296296                        $yTemp = intval($i / 12); 
    297297                        if (($month - $mTemp) <= 0) { 
    298                                 $yTemp++; 
     298                                ++$yTemp; 
    299299                                $mTemp = 12 + ($month - $mTemp); 
    300300                        } else { 
     
    611611            if ($year++ == 99) { 
    612612                $year = 0; 
    613                 $century++; 
     613                ++$century; 
    614614            } 
    615615        } 
  • trunk/workflow/inc/local/classes/class.wf_ldap.php

    r3167 r7655  
    142142                /* prepara a saída */ 
    143143                $output = array(); 
    144                 for ($i = 0; $i < $result['count']; $i++) 
     144                for ($i = 0; $i < $result['count']; ++$i) 
    145145                        $output[] = array( 
    146146                                'id' => $result[$i]['uidnumber'][0], 
  • trunk/workflow/inc/local/classes/class.wf_paging.php

    r795 r7655  
    215215        { 
    216216                $output = parent::paginationResult(); 
    217                 if (isset($this->originalRequest['s_co']) && isset($this->originalRequest['s_so'])) 
    218                         for ($i = 0; $i < count($output); $i++) 
     217                if (isset($this->originalRequest['s_co']) && isset($this->originalRequest['s_so'])){ 
     218            $output_count = count($output); 
     219                        for ($i = 0; $i < $output_count; ++$i) 
    219220                                $output[$i]['link'] .= "&amp;s_co=" . $this->storage['s_co'] . "&amp;s_so=" . $this->storage['s_so']; 
     221        } 
    220222                return $output; 
    221223        } 
Note: See TracChangeset for help on using the changeset viewer.