Changeset 7655 for trunk/library


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/library
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/library/CssToInlineStyles/css_to_inline_styles.php

    r5745 r7655  
    409409 
    410410                        // increment 
    411                         $i++; 
     411                        ++$i; 
    412412                } 
    413413 
  • trunk/library/Mail/Mail/RFC822.php

    r6118 r7655  
    332332        $string = $parts[0]; 
    333333 
    334         for ($i = 0; $i < count($parts); $i++) { 
     334        for ($i = 0; $i < count($parts); ++$i) { 
    335335            if ($this->_hasUnclosedQuotes($string) 
    336336                || $this->_hasUnclosedBrackets($string, '<>') 
     
    426426    { 
    427427        $parts = explode($char, $string); 
    428         for ($i = 0; $i < count($parts); $i++){ 
     428        for ($i = 0; $i < count($parts); ++$i){ 
    429429            if (substr($parts[$i], -1) == '\\' || $this->_hasUnclosedQuotes($parts[$i])) 
    430430                $num--; 
     
    500500        //                         geezer 
    501501        // ... or any other format valid by RFC 822. 
    502         for ($i = 0; $i < count($addresses); $i++) { 
     502        for ($i = 0; $i < count($addresses); ++$i) { 
    503503            if (!$this->validateMailbox($addresses[$i])) { 
    504504                if (empty($this->error)) { 
     
    544544        while (count($parts) > 0){ 
    545545            $phrase_parts[] = $this->_splitCheck($parts, ' '); 
    546             for ($i = 0; $i < $this->index + 1; $i++) 
     546            for ($i = 0; $i < $this->index + 1; ++$i) 
    547547                array_shift($parts); 
    548548        } 
     
    797797        while (count($subdomains) > 0) { 
    798798            $sub_domains[] = $this->_splitCheck($subdomains, '.'); 
    799             for ($i = 0; $i < $this->index + 1; $i++) 
     799            for ($i = 0; $i < $this->index + 1; ++$i) 
    800800                array_shift($subdomains); 
    801801        } 
     
    891891        while (count($parts) > 0){ 
    892892            $words[] = $this->_splitCheck($parts, '.'); 
    893             for ($i = 0; $i < $this->index + 1; $i++) { 
     893            for ($i = 0; $i < $this->index + 1; ++$i) { 
    894894                array_shift($parts); 
    895895            } 
  • trunk/library/Net/SMTP.php

    r5316 r7655  
    332332        } 
    333333 
    334         for ($i = 0; $i <= $this->_pipelined_commands; $i++) { 
     334        for ($i = 0; $i <= $this->_pipelined_commands; ++$i) { 
    335335            while ($line = $this->_socket->readLine()) { 
    336336                $this->_debug("Recv: $line"); 
     
    11121112                    $end = $size; 
    11131113                } else { 
    1114                     for (; $end < $size; $end++) { 
     1114                    for (; $end < $size; ++$end) { 
    11151115                        if ($data[$end] != "\n") { 
    11161116                            break; 
  • trunk/library/Net/Sieve.php

    r6118 r7655  
    929929        $data = preg_split('/\r?\n/', $this->_toUpper($data), -1, PREG_SPLIT_NO_EMPTY); 
    930930 
    931         for ($i = 0; $i < count($data); $i++) { 
     931        for ($i = 0; $i < count($data); ++$i) { 
    932932            if (!preg_match('/^"([A-Z]+)"( "(.*)")?$/', $data[$i], $matches)) { 
    933933                continue; 
     
    11201120 
    11211121                $response .= $line . "\r\n"; 
    1122                 $referralCount++; 
     1122                ++$referralCount; 
    11231123            } 
    11241124        } 
  • trunk/library/PEAR/PEAR/Command/Remote.php

    r5146 r7655  
    793793                        $output .= "deleted $path\n"; 
    794794                    } 
    795                     $num++; 
     795                    ++$num; 
    796796                } elseif ($verbose >= 1) { 
    797797                    $output .= "failed to delete $path $php_errormsg\n"; 
  • trunk/library/PEAR/PEAR/Command/Test.php

    r5146 r7655  
    289289            } 
    290290 
    291             $j++; 
     291            ++$j; 
    292292        } 
    293293 
  • trunk/library/PEAR/PEAR/Downloader.php

    r5146 r7655  
    13301330        $installOrder = Structures_Graph_Manipulator_TopologicalSorter::sort($depgraph); 
    13311331        $ret = array(); 
    1332         for ($i = 0, $count = count($installOrder); $i < $count; $i++) { 
     1332        for ($i = 0, $count = count($installOrder); $i < $count; ++$i) { 
    13331333            foreach ($installOrder[$i] as $index => $sortedpackage) { 
    13341334                $data = &$installOrder[$i][$index]->getData(); 
  • trunk/library/PEAR/PEAR/ErrorStack.php

    r5146 r7655  
    845845                  $backtrace[$functionframe]['function'] == 'eval' && 
    846846                  isset($backtrace[$functionframe + 1])) { 
    847                 $functionframe++; 
     847                ++$functionframe; 
    848848            } 
    849849        } 
    850850        if (isset($backtrace[$frame])) { 
    851851            if (!isset($backtrace[$frame]['file'])) { 
    852                 $frame++; 
     852                ++$frame; 
    853853            } 
    854854            $funcbacktrace = $backtrace[$functionframe]; 
  • trunk/library/PEAR/PEAR/Frontend/CLI.php

    r5146 r7655  
    271271                        echo $this->bold("* Enter an answer for #" . $i . ": ({$prompts[$var]})\n"); 
    272272                    } 
    273                     $i++; 
     273                    ++$i; 
    274274                } 
    275275            } 
     
    579579    { 
    580580        $highest = 1; 
    581         for ($i = 0; $i < count($columns); $i++) { 
     581        for ($i = 0; $i < count($columns); ++$i) { 
    582582            $col = &$columns[$i]; 
    583583            if (isset($colparams[$i]) && !empty($colparams[$i]['wrap'])) { 
     
    642642            $width = $widest; 
    643643        } else { 
    644             for ($i = 0; $i < $ncols; $i++) { 
     644            for ($i = 0; $i < $ncols; ++$i) { 
    645645                if (!isset($width[$i])) { 
    646646                    $width[$i] = $widest[$i]; 
     
    672672        } 
    673673 
    674         for ($i = 0; $i < count($table_data); $i++) { 
     674        for ($i = 0; $i < count($table_data); ++$i) { 
    675675            extract($table_data[$i]); 
    676676            if (!is_array($rowparams)) { 
     
    691691                } 
    692692            } else { 
    693                 for ($c = 0; $c < count($data); $c++) { 
     693                for ($c = 0; $c < count($data); ++$c) { 
    694694                    $rowlines[$c] = array($data[$c]); 
    695695                } 
    696696            } 
    697697 
    698             for ($r = 0; $r < $height; $r++) { 
     698            for ($r = 0; $r < $height; ++$r) { 
    699699                $rowtext = ''; 
    700                 for ($c = 0; $c < count($data); $c++) { 
     700                for ($c = 0; $c < count($data); ++$c) { 
    701701                    if (isset($colparams[$c])) { 
    702702                        $attribs = array_merge($rowparams, $colparams); 
  • trunk/library/PEAR/PEAR/PackageFile/v1.php

    r5146 r7655  
    11181118                        array('index' => $i)); 
    11191119                } 
    1120                 $i++; 
     1120                ++$i; 
    11211121            } 
    11221122            if (!$haslead) { 
     
    11651165                        array('index' => $i)); 
    11661166                } 
    1167                 $i++; 
     1167                ++$i; 
    11681168            } 
    11691169        } 
     
    11791179                        array('index' => $i)); 
    11801180                } 
    1181                 $i++; 
     1181                ++$i; 
    11821182            } 
    11831183        } 
     
    13751375        $tokens = token_get_all($contents); 
    13761376/* 
    1377         for ($i = 0; $i < sizeof($tokens); $i++) { 
     1377        for ($i = 0; $i < sizeof($tokens); ++$i) { 
    13781378            @list($token, $data) = $tokens[$i]; 
    13791379            if (is_string($token)) { 
     
    14061406        $inquote = false; 
    14071407        $interface = false; 
    1408         for ($i = 0; $i < sizeof($tokens); $i++) { 
     1408        for ($i = 0; $i < sizeof($tokens); ++$i) { 
    14091409            if (is_array($tokens[$i])) { 
    14101410                list($token, $data) = $tokens[$i]; 
  • trunk/library/PEAR/PEAR/PackageFile/v2.php

    r5146 r7655  
    329329        $mymaintainers = $this->getMaintainers(); 
    330330        $yourmaintainers = $pf1->getMaintainers(); 
    331         for ($i1 = 0; $i1 < count($yourmaintainers); $i1++) { 
     331        for ($i1 = 0; $i1 < count($yourmaintainers); ++$i1) { 
    332332            $reset = false; 
    333             for ($i2 = 0; $i2 < count($mymaintainers); $i2++) { 
     333            for ($i2 = 0; $i2 < count($mymaintainers); ++$i2) { 
    334334                if ($mymaintainers[$i2]['handle'] == $yourmaintainers[$i1]['handle']) { 
    335335                    if ($mymaintainers[$i2]['role'] != $yourmaintainers[$i1]['role']) { 
     
    12131213            } 
    12141214 
    1215             for ($i = 0; $i < count($releases['configureoption']); $i++) { 
     1215            for ($i = 0; $i < count($releases['configureoption']); ++$i) { 
    12161216                $releases['configureoption'][$i] = $releases['configureoption'][$i]['attribs']; 
    12171217            } 
  • trunk/library/PEAR/PEAR/PackageFile/v2/Validator.php

    r5146 r7655  
    18811881        } 
    18821882/* 
    1883         for ($i = 0; $i < sizeof($tokens); $i++) { 
     1883        for ($i = 0; $i < sizeof($tokens); ++$i) { 
    18841884            @list($token, $data) = $tokens[$i]; 
    18851885            if (is_string($token)) { 
     
    19121912        $inquote = false; 
    19131913        $interface = false; 
    1914         for ($i = 0; $i < sizeof($tokens); $i++) { 
     1914        for ($i = 0; $i < sizeof($tokens); ++$i) { 
    19151915            if (is_array($tokens[$i])) { 
    19161916                list($token, $data) = $tokens[$i]; 
  • trunk/library/PEAR/PEAR/RunTest.php

    r6057 r7655  
    397397 
    398398 
    399             for ($i = 0; $i < $numLines; $i++) { 
     399            for ($i = 0; $i < $numLines; ++$i) { 
    400400                if (isset($lines[$i]) && substr($lines[$i], 0, 9) == 'namespace') { 
    401401                    $namespace         = substr($lines[$i], 10, -1); 
  • trunk/library/PEAR/System.php

    r5146 r7655  
    323323 
    324324        $count_args = count($args); 
    325         for ($i = 0; $i < $count_args; $i++) { 
     325        for ($i = 0; $i < $count_args; ++$i) { 
    326326            if ($args[$i] == '>') { 
    327327                $mode = 'wb'; 
     
    578578        $do_files = $do_dirs = true; 
    579579        $args_count = count($args); 
    580         for ($i = 0; $i < $args_count; $i++) { 
     580        for ($i = 0; $i < $args_count; ++$i) { 
    581581            switch ($args[$i]) { 
    582582                case '-type': 
     
    588588                        } 
    589589                    } 
    590                     $i++; 
     590                    ++$i; 
    591591                    break; 
    592592                case '-name': 
     
    596596                    $name = strtr($name, array('\?' => '.', '\*' => '.*')); 
    597597                    $patterns[] = '('.$name.')'; 
    598                     $i++; 
     598                    ++$i; 
    599599                    break; 
    600600                case '-maxdepth': 
     
    616616            $ret = array(); 
    617617            $files_count = count($files); 
    618             for ($i = 0; $i < $files_count; $i++) { 
     618            for ($i = 0; $i < $files_count; ++$i) { 
    619619                // only search in the part of the file below the current directory 
    620620                $filepart = basename($files[$i]); 
  • trunk/library/ckeditor/plugins/aspell/spellerpages/server-scripts/spellchecker.php

    r5081 r7655  
    8282        # open temp file, add the submitted text. 
    8383        if( $fh = fopen( $tempfile, 'w' )) { 
    84                 for( $i = 0; $i < count( $textinputs ); $i++ ) { 
     84                for( $i = 0; $i < count( $textinputs ); ++$i ) { 
    8585                        $text = urldecode( $textinputs[$i] ); 
    8686                        $text = html_entity_decode ($text , ENT_QUOTES , 'UTF-8'  ); 
     
    122122                                        } 
    123123                                        print_suggs_elem( $suggs, $index, $text_input_index ); 
    124                                         $index++; 
     124                                        ++$index; 
    125125                                } elseif( $chardesc == '*' ) { 
    126                                         $text_input_index++; 
     126                                        ++$text_input_index; 
    127127                                        print_textindex_decl( $text_input_index ); 
    128128                                        $index = 0; 
  • trunk/library/csstidy/class.csstidy.php

    r5135 r7655  
    367367                        break; 
    368368                } 
    369                 $i++; 
     369                ++$i; 
    370370        } 
    371371 
     
    419419        $template = explode('|',$content); 
    420420 
    421         for ($i = 0; $i < count($template); $i++ ) 
     421        for ($i = 0; $i < count($template); ++$i ) 
    422422        { 
    423423                $this->template[$i] = $template[$i]; 
     
    470470    $cur_comment = ''; 
    471471 
    472     for ($i = 0, $size = strlen($string); $i < $size; $i++ ) 
     472    for ($i = 0, $size = strlen($string); $i < $size; ++$i ) 
    473473    { 
    474474        if($string{$i} == "\n" || $string{$i} == "\r") 
     
    812812            { 
    813813                $this->status = $this->from; 
    814                 $i++; 
     814                ++$i; 
    815815                $this->_add_token(COMMENT, $cur_comment); 
    816816                $cur_comment = ''; 
  • trunk/library/csstidy/class.csstidy_optimise.php

    r4414 r7655  
    302302            $color_tmp = substr($color,4,strlen($color)-5); 
    303303            $color_tmp = explode(',',$color_tmp); 
    304             for ( $i = 0; $i < count($color_tmp); $i++ ) 
     304            for ( $i = 0; $i < count($color_tmp); ++$i ) 
    305305            { 
    306306                $color_tmp[$i] = trim ($color_tmp[$i]); 
     
    312312            } 
    313313            $color = '#'; 
    314             for ($i = 0; $i < 3; $i++ ) 
     314            for ($i = 0; $i < 3; ++$i ) 
    315315            { 
    316316                if($color_tmp[$i]<16) { 
     
    383383            $temp = array($subvalue); 
    384384        } 
    385         for ($l = 0; $l < count($temp); $l++) 
     385        for ($l = 0; $l < count($temp); ++$l) 
    386386        { 
    387387            // continue if no numeric value 
     
    404404            { 
    405405                $unit_found = FALSE; 
    406                 for ($m = 0, $size_4 = count($units); $m < $size_4; $m++) 
     406                for ($m = 0, $size_4 = count($units); $m < $size_4; ++$m) 
    407407                { 
    408408                    if (strpos(strtolower($temp[$l]),$units[$m]) !== FALSE) 
     
    514514        if(count($values) == 4) 
    515515        { 
    516             for($i=0;$i<4;$i++) 
     516            for($i=0;$i<4;++$i) 
    517517            { 
    518518                $return[$shorthands[$property][$i]] = $values[$i].$important; 
     
    528528        elseif(count($values) == 2) 
    529529        { 
    530             for($i=0;$i<4;$i++) 
     530            for($i=0;$i<4;++$i) 
    531531            { 
    532532                $return[$shorthands[$property][$i]] = (($i % 2 != 0)) ? $values[1].$important : $values[0].$important; 
     
    535535        else 
    536536        { 
    537             for($i=0;$i<4;$i++) 
     537            for($i=0;$i<4;++$i) 
    538538            { 
    539539                $return[$shorthands[$property][$i]] = $values[0].$important; 
     
    558558        $output = array(); 
    559559        $num = 0; 
    560         for($i = 0, $len = strlen($string);$i < $len; $i++) 
     560        for($i = 0, $len = strlen($string);$i < $len; ++$i) 
    561561        { 
    562562            switch($status) 
     
    619619 
    620620                $important = ''; 
    621                 for($i = 0; $i < 4; $i++) 
     621                for($i = 0; $i < 4; ++$i) 
    622622                { 
    623623                    $val = $array[$value[$i]]; 
     
    665665 
    666666        $str_value = csstidy_optimise::explode_ws(',',$str_value); 
    667         for($i = 0; $i < count($str_value); $i++) 
     667        for($i = 0; $i < count($str_value); ++$i) 
    668668        { 
    669669            $have['clip'] = FALSE; $have['pos'] = FALSE; 
     
    672672            $str_value[$i] = csstidy_optimise::explode_ws(' ',trim($str_value[$i])); 
    673673 
    674             for($j = 0; $j < count($str_value[$i]); $j++) 
     674            for($j = 0; $j < count($str_value[$i]); ++$j) 
    675675            { 
    676676                if($have['bg'] === FALSE && (substr($str_value[$i][$j],0,4) == 'url(' || $str_value[$i][$j] === 'none')) 
     
    743743        $important = ''; 
    744744 
    745         for($i = 0; $i < $number_of_values; $i++) 
     745        for($i = 0; $i < $number_of_values; ++$i) 
    746746        { 
    747747            foreach($background_prop_default as $bg_property => $default_value) 
  • trunk/library/csstidy/css_optimiser.php

    r4414 r7655  
    322322                        { 
    323323                                echo '<dt>'.$line.'</dt>'; 
    324                                 for($i = 0; $i < count($array); $i++) 
     324                                for($i = 0; $i < count($array); ++$i) 
    325325                                { 
    326326                                        echo '<dd class="'.$array[$i]['t'].'">'.$array[$i]['m'].'</dd>'; 
  • trunk/library/iCalcreator/iCalUtilityFunctions.class.php

    r5146 r7655  
    352352    $output = array(); 
    353353    $val    = null; 
    354     for( $ix=0; $ix < strlen( $duration ); $ix++ ) { 
     354    for( $ix=0; $ix < strlen( $duration ); ++$ix ) { 
    355355      switch( strtoupper( substr( $duration, $ix, 1 ))) { 
    356356       case 'W': 
     
    697697        $yeardays   = $weekno = 0; 
    698698        $yeardaycnt = array(); 
    699         for( $m = 1; $m <= 12; $m++ ) { // count up and update up-counters 
     699        for( $m = 1; $m <= 12; ++$m ) { // count up and update up-counters 
    700700          $daycnts[$m] = array(); 
    701701          $weekdaycnt = array(); 
     
    703703            $yeardaycnt[$dn] = $weekdaycnt[$dn] = 0; 
    704704          $mcnt     = date( 't', mktime( 0, 0, 0, $m, 1, $wdate['year'] )); 
    705           for( $d   = 1; $d <= $mcnt; $d++ ) { 
     705          for( $d   = 1; $d <= $mcnt; ++$d ) { 
    706706            $daycnts[$m][$d] = array(); 
    707707            if( isset( $recur['BYYEARDAY'] )) { 
    708               $yeardays++; 
     708              ++$yeardays; 
    709709              $daycnts[$m][$d]['yearcnt_up'] = $yeardays; 
    710710            } 
     
    880880        else { 
    881881            /* update result array if BYSETPOS is set */ 
    882           $countcnt++; 
     882          ++$countcnt; 
    883883          if( $startdatets <= $wdatets ) { // only output within period 
    884884            $result[$wdatets] = TRUE; 
     
    939939       //echo "recur ".implode('-',iCalUtilityFunctions::_date_time_string(date('Y-m-d H:i:s',$bysetposarr1[$ix]),6))."<br />\n";//test 
    940940              } 
    941               $countcnt++; 
     941              ++$countcnt; 
    942942            } 
    943943            if( isset( $recur['COUNT'] ) && ( $countcnt >= $recur['COUNT'] )) 
  • trunk/library/iCalcreator/iCalcreator.class.php

    r5316 r7655  
    394394            if( $propix != $xpropno ) 
    395395              $reduced[$xpropkey] = $xpropvalue; 
    396             $xpropno++; 
     396            ++$xpropno; 
    397397          } 
    398398        } 
     
    450450                                    : array( $xpropkey, $this->xprop[$xpropkey]['value'] ); 
    451451            else 
    452               $xpropno++; 
     452              ++$xpropno; 
    453453          } 
    454454          return FALSE; // not found ?? 
     
    766766          return TRUE; 
    767767        } 
    768         $cix1dC++; 
     768        ++$cix1dC; 
    769769      } 
    770770      elseif( !$argType && ($arg1 == $component->getProperty( 'uid' ))) { 
     
    817817         if( $index == $cix1gC ) 
    818818           return $component->copy(); 
    819          $cix1gC++; 
     819         ++$cix1gC; 
    820820      } 
    821821      elseif( !$argType && ($arg1 == $component->getProperty( 'uid' ))) { 
     
    12191219          return TRUE; 
    12201220        } 
    1221         $cix1sC++; 
     1221        ++$cix1sC; 
    12221222      } 
    12231223      elseif( !$argType && ( $arg1 == $component2->getProperty( 'uid' ))) { // UID insert/replace 
     
    12891289    elseif( 'vtimezone' == $b->objName )          return  1; 
    12901290    $sortkeys = array( 'year', 'month', 'day', 'hour', 'min', 'sec' ); 
    1291     for( $k = 0; $k < 4 ; $k++ ) { 
     1291    for( $k = 0; $k < 4 ; ++$k ) { 
    12921292      if(        empty( $a->srtk[$k] ))           return -1; 
    12931293      elseif(    empty( $b->srtk[$k] ))           return  1; 
     
    13761376        $line = substr( $line, 0, ( strlen( $line ) - strlen( "\n\r" ))).'\n'; 
    13771377      if(     'BEGIN:VCALENDAR' == strtoupper( substr( $line, 0, 15 ))) { 
    1378         $calsync++; 
     1378        ++$calsync; 
    13791379        continue; 
    13801380      } 
     
    14201420        if( $newProp ) { 
    14211421          $newProp = FALSE; 
    1422           $lastix++; 
     1422          ++$lastix; 
    14231423          $proprows[$lastix]  = $line; 
    14241424        } 
     
    14461446            /* get propname */ 
    14471447        $cix = $propname = null; 
    1448         for( $cix=0, $clen = strlen( $line ); $cix < $clen; $cix++ ) { 
     1448        for( $cix=0, $clen = strlen( $line ); $cix < $clen; ++$cix ) { 
    14491449          if( in_array( $line[$cix], array( ':', ';' ))) 
    14501450            break; 
     
    14601460        $attrix = -1; 
    14611461        $strlen = strlen( $line ); 
    1462         for( $cix=0; $cix < $strlen; $cix++ ) { 
     1462        for( $cix=0; $cix < $strlen; ++$cix ) { 
    14631463          if((       ':'   == $line[$cix] )             && 
    14641464                   ( '://' != substr( $line, $cix, 3 )) && 
     
    15001500          $content  = explode( ',', $line ); 
    15011501          $clen     = count( $content ); 
    1502           for( $cix = 0; $cix < $clen; $cix++ ) { 
     1502          for( $cix = 0; $cix < $clen; ++$cix ) { 
    15031503            if( "\\" == substr( $content[$cix], -1 )) { 
    15041504              $content[$cix] .= ','.$content[$cix + 1]; 
    15051505              unset( $content[$cix + 1] ); 
    1506               $cix++; 
     1506              ++$cix; 
    15071507            } 
    15081508          } 
     
    27402740        if( $fno < $cnt ) 
    27412741          $content .= ','; 
    2742         $fno++; 
     2742        ++$fno; 
    27432743      } 
    27442744      $output .= $this->_createElement( 'FREEBUSY', $attributes, $content ); 
     
    31223122        if( $rno < $cnt ) 
    31233123          $content .= ','; 
    3124         $rno++; 
     3124        ++$rno; 
    31253125      } 
    31263126      $output    .= $this->_createElement( 'RDATE', $attributes, $content ); 
     
    39303930    $length = 6; 
    39313931    $str    = null; 
    3932     for( $p = 0; $p < $length; $p++ ) 
     3932    for( $p = 0; $p < $length; ++$p ) 
    39333933      $unique .= $base{mt_rand( $start, $end )}; 
    39343934    $this->uid = array( 'params' => null ); 
     
    43354335                } 
    43364336                $content2 .= $content21.$content22; 
    4337                 $bydaycnt++; 
     4337                ++$bydaycnt; 
    43384338              } 
    43394339              else { 
     
    43434343                else { 
    43444344                  $content22 .= $valuePart; 
    4345                   $bydaycnt++; 
     4345                  ++$bydaycnt; 
    43464346                } 
    43474347                $content2 .= $content21.$content22; 
     
    48124812            if( $propix != $xpropno ) 
    48134813              $reduced[$xpropkey] = $xpropvalue; 
    4814             $xpropno++; 
     4814            ++$xpropno; 
    48154815          } 
    48164816        } 
     
    50295029                                    : array( $xpropkey, $this->xprop[$xpropkey]['value'] ); 
    50305030            else 
    5031               $xpropno++; 
     5031              ++$xpropno; 
    50325032          } 
    50335033          return FALSE; // not found ?? 
     
    50545054      return FALSE; 
    50555055    $arglist[0] = strtoupper( $arglist[0] ); 
    5056     for( $argix=$numargs; $argix < 12; $argix++ ) { 
     5056    for( $argix=$numargs; $argix < 12; ++$argix ) { 
    50575057      if( !isset( $arglist[$argix] )) 
    50585058        $arglist[$argix] = null; 
     
    52125212      if( $newProp ) { 
    52135213        $newProp = FALSE; 
    5214         $lastix++; 
     5214        ++$lastix; 
    52155215        $proprows[$lastix]  = $line; 
    52165216      } 
     
    52405240            /* get propname, (problem with x-properties, otherwise in previous loop) */ 
    52415241      $cix = $propname = null; 
    5242       for( $cix=0, $clen = strlen( $line ); $cix < $clen; $cix++ ) { 
     5242      for( $cix=0, $clen = strlen( $line ); $cix < $clen; ++$cix ) { 
    52435243        if( in_array( $line[$cix], array( ':', ';' ))) 
    52445244          break; 
     
    52595259      $controlCN = false; 
    52605260 
    5261       for( $cix=0; $cix < $clen; $cix++ ) { 
     5261      for( $cix=0; $cix < $clen; ++$cix ) { 
    52625262 
    52635263        if('"' == $line[$cix] && $controlCN)  $controlCN = false; 
     
    53155315            $content  = explode( ',', $line ); 
    53165316            $clen     = count( $content ); 
    5317             for( $cix = 0; $cix < $clen; $cix++ ) { 
     5317            for( $cix = 0; $cix < $clen; ++$cix ) { 
    53185318              if( "\\" == substr($content[$cix], -1)) { 
    53195319                $content[$cix] .= ','.$content[$cix + 1]; 
    53205320                unset($content[$cix + 1]); 
    5321                 $cix++; 
     5321                ++$cix; 
    53225322              } 
    53235323            } 
     
    55225522          return TRUE; 
    55235523        } 
    5524         $cix2dC++; 
     5524        ++$cix2dC; 
    55255525      } 
    55265526      elseif( !$argType && ($arg1 == $component->getProperty( 'uid' ))) { 
     
    55745574         if( $index == $cix2gC ) 
    55755575           return $component->copy(); 
    5576          $cix2gC++; 
     5576         ++$cix2gC; 
    55775577      } 
    55785578      elseif( !$argType && ( $arg1 == $component->getProperty( 'uid' ))) { 
     
    56715671          return TRUE; 
    56725672        } 
    5673         $cix2sC++; 
     5673        ++$cix2sC; 
    56745674      } 
    56755675      elseif( !$argType && ( $arg1 == $component2->getProperty( 'uid' ))) { // UID insert/replace 
     
    57515751      $bytecnt = strlen( $tmp ); 
    57525752      $charCnt = $ix = 0; 
    5753       for( $ix = 0; $ix < $bytecnt; $ix++ ) { 
     5753      for( $ix = 0; $ix < $bytecnt; ++$ix ) { 
    57545754        if(( 73 < $charCnt ) && ( '\n' == substr( $tmp, $ix, $eolcharlen ))) { 
    57555755          $ix += $eolcharlen; 
  • trunk/library/mime/mime.php

    r6266 r7655  
    895895        case !$text && !$html && $attachments: 
    896896            $message =& $this->_addMixedPart(); 
    897             for ($i = 0; $i < count($this->_parts); $i++) { 
     897            for ($i = 0; $i < count($this->_parts); ++$i) { 
    898898                $this->_addAttachmentPart($message, $this->_parts[$i]); 
    899899            } 
     
    903903            $message =& $this->_addMixedPart(); 
    904904            $this->_addTextPart($message, $this->_txtbody); 
    905             for ($i = 0; $i < count($this->_parts); $i++) { 
     905            for ($i = 0; $i < count($this->_parts); ++$i) { 
    906906                $this->_addAttachmentPart($message, $this->_parts[$i]); 
    907907            } 
     
    930930                $ht =& $this->_addRelatedPart($message); 
    931931                $this->_addHtmlPart($ht); 
    932                 for ($i = 0; $i < count($this->_html_images); $i++) { 
     932                for ($i = 0; $i < count($this->_html_images); ++$i) { 
    933933                    $this->_addHtmlImagePart($ht, $this->_html_images[$i]); 
    934934                } 
     
    939939                $message =& $this->_addRelatedPart($null); 
    940940                $this->_addHtmlPart($message); 
    941                 for ($i = 0; $i < count($this->_html_images); $i++) { 
     941                for ($i = 0; $i < count($this->_html_images); ++$i) { 
    942942                    $this->_addHtmlImagePart($message, $this->_html_images[$i]); 
    943943                } 
     
    958958                $this->_addHtmlPart($message); 
    959959            } 
    960             for ($i = 0; $i < count($this->_html_images); $i++) { 
     960            for ($i = 0; $i < count($this->_html_images); ++$i) { 
    961961                $this->_addHtmlImagePart($message, $this->_html_images[$i]); 
    962962            } 
     
    973973                $this->_addHtmlPart($message); 
    974974            } 
    975             for ($i = 0; $i < count($this->_parts); $i++) { 
     975            for ($i = 0; $i < count($this->_parts); ++$i) { 
    976976                $this->_addAttachmentPart($message, $this->_parts[$i]); 
    977977            } 
     
    989989            } 
    990990            $this->_addHtmlPart($rel); 
    991             for ($i = 0; $i < count($this->_html_images); $i++) { 
     991            for ($i = 0; $i < count($this->_html_images); ++$i) { 
    992992                $this->_addHtmlImagePart($rel, $this->_html_images[$i]); 
    993993            } 
    994             for ($i = 0; $i < count($this->_parts); $i++) { 
     994            for ($i = 0; $i < count($this->_parts); ++$i) { 
    995995                $this->_addAttachmentPart($message, $this->_parts[$i]); 
    996996            } 
     
    10091009            } 
    10101010                         
    1011             for ($i = 0; $i < count($this->_html_images); $i++) { 
     1011            for ($i = 0; $i < count($this->_html_images); ++$i) { 
    10121012                $this->_addHtmlImagePart($message, $this->_html_images[$i]); 
    10131013            } 
    1014             for ($i = 0; $i < count($this->_parts); $i++) { 
     1014            for ($i = 0; $i < count($this->_parts); ++$i) { 
    10151015                $this->_addAttachmentPart($message, $this->_parts[$i]); 
    10161016            } 
  • trunk/library/mime/mimeDecode.php

    r6063 r7655  
    326326 
    327327                    $parts = $this->_boundarySplit($body, $content_type['other']['boundary']); 
    328                     for ($i = 0; $i < count($parts); $i++) { 
     328                    for ($i = 0; $i < count($parts); ++$i) { 
    329329                        list($part_header, $part_body) = $this->_splitBodyHeader($parts[$i]); 
    330330                        $part = $this->_decode($part_header, $part_body, $default_ctype); 
     
    386386                $return[$prepend . $mime_number] = &$structure; 
    387387            } 
    388             for ($i = 0; $i < count($structure->parts); $i++) { 
     388            for ($i = 0; $i < count($structure->parts); ++$i) { 
    389389 
    390390             
     
    521521            $escaped = false; 
    522522            if ($c == '\\') { 
    523                 $i++; 
     523                ++$i; 
    524524                if ($i == $l-1) { // end of string. 
    525525                    break; 
     
    535535                    $val = ''; 
    536536                    $key = trim($key); 
    537                     $i++; 
     537                    ++$i; 
    538538                    continue; 
    539539                } 
     
    547547                } 
    548548                $key .= $c; 
    549                 $i++; 
     549                ++$i; 
    550550                continue; 
    551551            } 
     
    556556                // not in quote yet. 
    557557                if ((!strlen($val) || $lq !== false) && $c == ' ' ||  $c == "\t") { 
    558                     $i++; 
     558                    ++$i; 
    559559                    continue; // skip leading spaces after '=' or after '"' 
    560560                } 
     
    565565                    // but we will handle it as a merged part of the string.. 
    566566                    $val = !strlen(trim($val)) ? '' : trim($val); 
    567                     $i++; 
     567                    ++$i; 
    568568                    continue; 
    569569                } 
     
    593593                    $key = ''; 
    594594                    $lq = false; 
    595                     $i++; 
     595                    ++$i; 
    596596                    continue; 
    597597                } 
    598598 
    599599                $val .= $c; 
    600                 $i++; 
     600                ++$i; 
    601601                continue; 
    602602            } 
     
    608608                $lq = $q; 
    609609                $q = false; 
    610                 $i++; 
     610                ++$i; 
    611611                continue; 
    612612            } 
     
    614614            // normal char inside of quoted string.. 
    615615            $val.= $c; 
    616             $i++; 
     616            ++$i; 
    617617        } 
    618618         
     
    668668 
    669669        $len = count($tmp) -1; 
    670         for ($i = 1; $i < $len; $i++) { 
     670        for ($i = 1; $i < $len; ++$i) { 
    671671            if (strlen(trim($tmp[$i]))) { 
    672672                $parts[] = $tmp[$i]; 
     
    792792        preg_match_all("/begin ([0-7]{3}) (.+)\r?\n(.+)\r?\nend/Us", $input, $matches); 
    793793 
    794         for ($j = 0; $j < count($matches[3]); $j++) { 
     794        for ($j = 0; $j < count($matches[3]); ++$j) { 
    795795 
    796796            $str      = $matches[3][$j]; 
     
    802802            $strlen = count($str); 
    803803 
    804             for ($i = 0; $i < $strlen; $i++) { 
     804            for ($i = 0; $i < $strlen; ++$i) { 
    805805                $pos = 1; 
    806806                $d = 0; 
     
    943943            // Multiple headers with this name 
    944944            if (is_array($headers[$hdr_name])) { 
    945                 for ($i = 0; $i < count($hdr_value); $i++) { 
     945                for ($i = 0; $i < count($hdr_value); ++$i) { 
    946946                    $output .= Mail_mimeDecode::_getXML_helper($hdr_name, $hdr_value[$i], $indent); 
    947947                } 
     
    954954 
    955955        if (!empty($input->parts)) { 
    956             for ($i = 0; $i < count($input->parts); $i++) { 
     956            for ($i = 0; $i < count($input->parts); ++$i) { 
    957957                $output .= $crlf . str_repeat($htab, $indent) . '<mimepart>' . $crlf . 
    958958                           Mail_mimeDecode::_getXML($input->parts[$i], $indent+1) . 
  • trunk/library/mime/mimePart.php

    r6057 r7655  
    283283            $encoded['body'] = '';  
    284284 
    285             for ($i = 0; $i < count($this->_subparts); $i++) { 
     285            for ($i = 0; $i < count($this->_subparts); ++$i) { 
    286286                $encoded['body'] .= '--' . $boundary . $eol; 
    287287                $tmp = $this->_subparts[$i]->encode(); 
     
    393393 
    394394        if (count($this->_subparts)) { 
    395             for ($i = 0; $i < count($this->_subparts); $i++) { 
     395            for ($i = 0; $i < count($this->_subparts); ++$i) { 
    396396                fwrite($fh, $f_eol . '--' . $boundary . $eol); 
    397397                $res = $this->_subparts[$i]->_encodePartToFile($fh); 
     
    581581                $char = $line[$i]; 
    582582                $dec  = ord($char); 
    583                 $i++; 
     583                ++$i; 
    584584 
    585585                if (($dec == 32) && (!isset($line[$i]))) { 
     
    688688                $value = ''; 
    689689            } 
    690             $headCount++; 
     690            ++$headCount; 
    691691        } 
    692692 
     
    921921        $strlen = strlen($string); 
    922922 
    923         for ($q=$p=$i=0; $i < $strlen; $i++) { 
     923        for ($q=$p=$i=0; $i < $strlen; ++$i) { 
    924924            if ($string[$i] == "\"" 
    925925                && (empty($string[$i-1]) || $string[$i-1] != "\\") 
     
    11031103            $prev  = ''; 
    11041104 
    1105             for ($i=1; $i<=$length; $i++) { 
     1105            for ($i=1; $i<=$length; ++$i) { 
    11061106                // See #17311 
    11071107                $chunk = mb_substr($str, $start, $i-$start, $charset); 
     
    11341134            $regexp = '/([\x22-\x29\x2C\x2E\x3A-\x40\x5B-\x60\x7B-\x7E\x80-\xFF])/'; 
    11351135 
    1136             for ($i=0; $i<=$length; $i++) { 
     1136            for ($i=0; $i<=$length; ++$i) { 
    11371137                $char = mb_substr($str, $i, 1, $charset); 
    11381138                // RFC recommends underline (instead of =20) in place of the space 
Note: See TracChangeset for help on using the changeset viewer.