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