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/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) . 
Note: See TracChangeset for help on using the changeset viewer.