Changeset 7655 for trunk/filemanager


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/filemanager
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/filemanager/inc/class.bofilemanager.inc.php

    r6037 r7655  
    156156                function ord_match ($string, $charnum) 
    157157                { 
    158                         for ($i = 0; $i < strlen ($string); $i++) 
     158                        for ($i = 0; $i < strlen ($string); ++$i) 
    159159                        { 
    160160                                $character = ord (substr ($string, $i, 1)); 
     
    191191                        if ($times == NULL) 
    192192                        $times = 1; 
    193                         for ($i = 0; $i != $times; $i++) 
     193                        for ($i = 0; $i != $times; ++$i) 
    194194                        { 
    195195                                if ($return) 
  • trunk/filemanager/inc/class.notifications.inc.php

    r3638 r7655  
    111111                        $email_to = explode( ",", $result[0]['email_to'] ); 
    112112                         
    113                         for( $i = 0 ; $i < count($email_to); $i++ ) 
     113                        for( $i = 0 ; $i < count($email_to); ++$i ) 
    114114                        { 
    115115                                if($email_to[$i] == $emailTo) 
  • trunk/filemanager/inc/class.uiconfig.inc.php

    r3887 r7655  
    273273                                $emails_to = explode(",", $result[0]['email_to']); 
    274274                                 
    275                                 for( $i = 0 ; $i < count($emails_to); $i++ ) 
     275                                for( $i = 0 ; $i < count($emails_to); ++$i ) 
    276276                                { 
    277277                                        $value_email_to .= "<tr>"; 
  • trunk/filemanager/inc/class.uifilemanager.inc.php

    r5327 r7655  
    544544                $this->readFilesInfo(); 
    545545 
    546                 for ($i = 0; $i != $this->numoffiles; $i++) 
     546                for ($i = 0; $i != $this->numoffiles; ++$i) 
    547547                { 
    548548                        $files = $this->files_array[$i]; 
     
    958958                        # We need to include all of the fileman entries for each file's form, 
    959959                        # so we loop through again 
    960                         for ($i = 0; $i != $this->numoffiles; $i++) { 
     960                        for ($i = 0; $i != $this->numoffiles; ++$i) { 
    961961                                if ($this->filename) 
    962962                                        $value = 'value="' . $this->filename . '"'; 
     
    12111211                                reset($this->files_array); 
    12121212                                $this->readFilesInfo(); 
    1213                                 for ($i = 0; $i < count($this->files_array); $i++) { 
     1213                                for ($i = 0; $i < count($this->files_array); ++$i) { 
    12141214                                        $comment = strtoupper($this->files_array[$i]['comment']); 
    12151215                                        $name = strtoupper($this->files_array[$i]['name']); 
  • trunk/filemanager/inc/class.vfs_functions.inc.php

    r5912 r7655  
    382382                                                'relatives'     => array(RELATIVE_NONE, RELATIVE_NONE) 
    383383                                        ))) 
    384                                                 $moved++; 
     384                                                ++$moved; 
    385385                                        else 
    386                                                 $error++; 
     386                                                ++$error; 
    387387                                } 
    388388                        } 
     
    412412                                                'relatives'     => array(RELATIVE_NONE, RELATIVE_NONE) 
    413413                                        ))) 
    414                                                 $copied++; 
     414                                                ++$copied; 
    415415                                        else 
    416                                                 $error++; 
     416                                                ++$error; 
    417417                                } 
    418418                        } 
  • trunk/filemanager/inc/jupload.php

    r3894 r7655  
    396396                                $rtry = $dir . $nameWithoutExtension . '.[' . $cnt . ']' . $ext; 
    397397                                while (file_exists($rtry)) { 
    398                                         $cnt++; 
     398                                        ++$cnt; 
    399399                                        $rtry = $dir . $nameWithoutExtension . '.[' . $cnt . ']' . $ext; 
    400400                                } 
     
    618618                                } 
    619619                                unlink($tmpname); 
    620                                 $cnt++; 
     620                                ++$cnt; 
    621621                                continue; 
    622622                        } 
     
    691691                                array_push($this->files, $files_data); 
    692692                        } 
    693                         $cnt++; 
     693                        ++$cnt; 
    694694                } 
    695695 
  • trunk/filemanager/inc/upload.php

    r5509 r7655  
    8989{ 
    9090        $command = "nice -n19 ".$current_config['filemanager_antivirus_command']; 
    91         for($i = 0; $i != $show_upload_boxes; $i++) 
     91        for($i = 0; $i != $show_upload_boxes; ++$i) 
    9292        { 
    9393                $command .= " ".$_FILES['upload_file']['tmp_name'][$i]; 
     
    108108{ 
    109109        $return = array( ); 
    110         for( $i = 0; $i != $show_upload_boxes; $i++) 
     110        for( $i = 0; $i != $show_upload_boxes; ++$i) 
    111111        { 
    112112                if ( $_FILES['upload_file']['error'][$i] !== 0 ) 
  • trunk/filemanager/tests/benchmark_dav.php

    r3019 r7655  
    3030    $times = array();  
    3131        $phpgw->vfs->cd(); 
    32         for ($i=0;$i<20; $i++) 
     32        for ($i=0;$i<20; ++$i) 
    3333        { 
    3434                $phpgw->vfs->dav_client->cached_props = array(); 
     
    4646    $times = array();  
    4747        $phpgw->vfs->cd(); 
    48         for ($i=0;$i<20; $i++) 
     48        for ($i=0;$i<20; ++$i) 
    4949        { 
    5050                $phpgw->vfs->dav_client->cached_props = array(); 
  • trunk/filemanager/tp/dompdf/dompdf.php

    r6057 r7655  
    108108    case "-h": 
    109109      $opts["h"] = true; 
    110       $i++; 
     110      ++$i; 
    111111      break; 
    112112 
    113113    case "-l": 
    114114      $opts["l"] = true; 
    115       $i++; 
     115      ++$i; 
    116116      break; 
    117117 
     
    146146    case "-v": 
    147147      $opts["v"] = true; 
    148       $i++; 
     148      ++$i; 
    149149      break; 
    150150 
    151151    case "-d": 
    152152      $opts["d"] = true; 
    153       $i++; 
     153      ++$i; 
    154154      break; 
    155155 
     
    163163   default: 
    164164      $opts["filename"] = $_SERVER["argv"][$i]; 
    165       $i++; 
     165      ++$i; 
    166166      break; 
    167167    } 
  • trunk/filemanager/tp/dompdf/include/cellmap.cls.php

    r3019 r7655  
    382382 
    383383        // Resolve the borders 
    384         for ( $i = 0; $i < $num_rows+1; $i++) { 
     384        for ( $i = 0; $i < $num_rows+1; ++$i) { 
    385385          $this->_resolve_border($start_row + $i, 0, "vertical", $bp["left"]); 
    386386          $this->_resolve_border($start_row + $i, $this->_num_cols, "vertical", $bp["right"]); 
    387387        } 
    388388 
    389         for ( $j = 0; $j < $this->_num_cols; $j++) { 
     389        for ( $j = 0; $j < $this->_num_cols; ++$j) { 
    390390          $this->_resolve_border($start_row, $j, "horizontal", $bp["top"]); 
    391391          $this->_resolve_border($this->__row, $j, "horizontal", $bp["bottom"]); 
     
    421421    $ac = $this->__col; 
    422422    while ( isset($this->_cells[$this->__row][$ac]) ) 
    423        $ac++; 
     423       ++$ac; 
    424424    $this->__col = $ac; 
    425425 
    426426    // Rows: 
    427     for ( $i = 0; $i < $rowspan; $i++ ) { 
     427    for ( $i = 0; $i < $rowspan; ++$i ) { 
    428428      $row = $this->__row + $i; 
    429429 
    430430      $this->_frames[ $key ]["rows"][] = $row; 
    431431 
    432       for ( $j = 0; $j < $colspan; $j++) 
     432      for ( $j = 0; $j < $colspan; ++$j) 
    433433        $this->_cells[$row][$this->__col + $j] = $frame; 
    434434 
     
    443443 
    444444    // Columns: 
    445     for ( $j = 0; $j < $colspan; $j++ ) { 
     445    for ( $j = 0; $j < $colspan; ++$j ) { 
    446446      $col = $this->__col + $j; 
    447447      $this->_frames[ $key ]["columns"][] = $col; 
     
    493493    $min = 0; 
    494494    $max = 0; 
    495     for ( $cs = 0; $cs < $colspan; $cs++ ) { 
     495    for ( $cs = 0; $cs < $colspan; ++$cs ) { 
    496496 
    497497      // Resolve the frame's width(s) with other cells 
     
    514514      // The frame needs more space.  Expand each sub-column 
    515515      $inc = ($frame_min - $min) / $colspan; 
    516       for ($c = 0; $c < $colspan; $c++) { 
     516      for ($c = 0; $c < $colspan; ++$c) { 
    517517        $col =& $this->get_column($this->__col + $c); 
    518518        $col["min-width"] += $inc; 
     
    522522    if ( $frame_max > $max ) { 
    523523      $inc = ($frame_max - $max) / $colspan; 
    524       for ($c = 0; $c < $colspan; $c++) { 
     524      for ($c = 0; $c < $colspan; ++$c) { 
    525525        $col =& $this->get_column($this->__col + $c); 
    526526        $col["max-width"] += $inc; 
     
    544544    $i = 0; 
    545545    while ( isset($this->_cells[$this->__row][$i]) ) 
    546       $i++; 
     546      ++$i; 
    547547 
    548548    $this->__col = $i; 
  • trunk/filemanager/tp/dompdf/include/cpdf_adapter.cls.php

    r3019 r7655  
    851851 
    852852      $this->close_object(); 
    853       $page_number++; 
     853      ++$page_number; 
    854854    } 
    855855  } 
  • trunk/filemanager/tp/dompdf/include/frame_tree.cls.php

    r3019 r7655  
    173173    // Store the children in an array so that the tree can be modified 
    174174    $children = array(); 
    175     for ($i = 0; $i < $node->childNodes->length; $i++) 
     175    for ($i = 0; $i < $node->childNodes->length; ++$i) 
    176176      $children[] = $node->childNodes->item($i); 
    177177 
  • trunk/filemanager/tp/dompdf/include/functions.inc.php

    r3019 r7655  
    343343 
    344344    $path[$i] = $dir; 
    345     $i++; 
     345    ++$i; 
    346346  } 
    347347 
     
    472472 
    473473    echo "#" . str_pad($i, 2, " ", STR_PAD_RIGHT) . ": " . str_pad($file.":", 42) . " $func\n"; 
    474     $i++; 
     474    ++$i; 
    475475  } 
    476476  echo "\n"; 
  • trunk/filemanager/tp/dompdf/include/gd_adapter.cls.php

    r3019 r7655  
    264264 
    265265      if ( count($style) == 1 ) { 
    266         for ($i = 0; $i < $style[0] * $this->_aa_factor; $i++) { 
     266        for ($i = 0; $i < $style[0] * $this->_aa_factor; ++$i) { 
    267267          $gd_style[] = $c; 
    268268        } 
    269269 
    270         for ($i = 0; $i < $style[0] * $this->_aa_factor; $i++) { 
     270        for ($i = 0; $i < $style[0] * $this->_aa_factor; ++$i) { 
    271271          $gd_style[] = $this->_bg_color; 
    272272        } 
     
    279279          if ( $i % 2 == 0 ) { 
    280280            // 'On' pattern 
    281             for ($i = 0; $i < $style[0] * $this->_aa_factor; $i++)  
     281            for ($i = 0; $i < $style[0] * $this->_aa_factor; ++$i) 
    282282              $gd_style[] = $c; 
    283283             
    284284          } else { 
    285285            // Off pattern 
    286             for ($i = 0; $i < $style[0] * $this->_aa_factor; $i++)  
     286            for ($i = 0; $i < $style[0] * $this->_aa_factor; ++$i) 
    287287              $gd_style[] = $this->_bg_color; 
    288288             
    289289          } 
    290           $i++; 
     290          ++$i; 
    291291        } 
    292292      } 
     
    332332 
    333333      foreach ($style as $length) { 
    334         for ($i = 0; $i < $length; $i++) { 
     334        for ($i = 0; $i < $length; ++$i) { 
    335335          $gd_style[] = $c; 
    336336        } 
     
    409409 
    410410      foreach ($style as $length) { 
    411         for ($i = 0; $i < $length; $i++) { 
     411        for ($i = 0; $i < $length; ++$i) { 
    412412          $gd_style[] = $c; 
    413413        } 
     
    456456 
    457457      foreach ($style as $length) { 
    458         for ($i = 0; $i < $length; $i++) { 
     458        for ($i = 0; $i < $length; ++$i) { 
    459459          $gd_style[] = $c; 
    460460        } 
  • trunk/filemanager/tp/dompdf/include/pdflib_adapter.cls.php

    r3019 r7655  
    281281    // Close all pages 
    282282    $this->_pdf->suspend_page(""); 
    283     for ($p = 1; $p <= $this->_page_count; $p++) { 
     283    for ($p = 1; $p <= $this->_page_count; ++$p) { 
    284284      $this->_pdf->resume_page("pagenumber=$p"); 
    285285      $this->_pdf->end_page_ext(""); 
     
    844844    $this->_pdf->suspend_page(""); 
    845845 
    846     for ($p = 1; $p <= $this->_page_count; $p++) { 
     846    for ($p = 1; $p <= $this->_page_count; ++$p) { 
    847847      $this->_pdf->resume_page("pagenumber=$p"); 
    848848 
  • trunk/filemanager/tp/dompdf/include/stylesheet.cls.php

    r6057 r7655  
    327327 
    328328    if ( !in_array($selector{0}, array(" ", ">", ".", "#", "+", ":", "[")) ) { 
    329         $d++; 
     329        ++$d; 
    330330    } 
    331331 
     
    373373 
    374374      $s = $selector{$i}; 
    375       $i++; 
     375      ++$i; 
    376376 
    377377      // Eat characters up to the next delimiter 
     
    500500        // Read the attribute value, if required 
    501501        if ( $op != "" ) { 
    502           $j++; 
     502          ++$j; 
    503503          while ( $j < $tok_len ) { 
    504504            if ( $tok{$j} == "]" ) 
     
    548548      } 
    549549    } 
    550     $i++; 
     550    ++$i; 
    551551 
    552552//       case ":": 
  • trunk/filemanager/tp/dompdf/include/text_frame_decorator.cls.php

    r3019 r7655  
    8282//      var_dump($text = $this->_frame->get_node()->data); 
    8383//      var_dump($asc = utf8_decode($text)); 
    84 //      for ($i = 0; $i < strlen($asc); $i++) 
     84//      for ($i = 0; $i < strlen($asc); ++$i) 
    8585//        pre_r("$i: " . $asc{$i} . " - " . ord($asc{$i})); 
    8686//      pre_r("width: " . Font_Metrics::get_text_width($text, $style->font_family, $style->font_size)); 
  • trunk/filemanager/tp/dompdf/lib/class.pdf.php

    r3019 r7655  
    22112211    $k = substr($k, 0, 256); 
    22122212 
    2213     for  ($i = 0;$i<256;$i++) { 
     2213    for  ($i = 0;$i<256;++$i) { 
    22142214 
    22152215      $this->arc4.=  chr($i); 
     
    22182218    $j = 0; 
    22192219 
    2220     for  ($i = 0;$i<256;$i++) { 
     2220    for  ($i = 0;$i<256;++$i) { 
    22212221 
    22222222      $t =  $this->arc4[$i]; 
     
    22462246    $out = ''; 
    22472247 
    2248     for  ($i = 0;$i<$len;$i++) { 
     2248    for  ($i = 0;$i<$len;++$i) { 
    22492249 
    22502250      $a =  ($a+1) %256; 
     
    26152615                  $dtmp[$bits2[0]] = array(); 
    26162616 
    2617                   for  ($i = 1;$i<count($bits2);$i++) { 
     2617                  for  ($i = 1;$i<count($bits2);++$i) { 
    26182618 
    26192619                    $dtmp[$bits2[0]][] = $bits2[$i]; 
     
    26612661                    $dtmp[$bits2[0]] = array(); 
    26622662 
    2663                     for  ($i = 1;$i<count($bits2);$i++) { 
     2663                    for  ($i = 1;$i<count($bits2);++$i) { 
    26642664 
    26652665                      $dtmp[$bits2[0]][] = $bits2[$i]; 
     
    28492849                if  ($lastChar>0 &&  $num>$lastChar+1) { 
    28502850 
    2851                   for ($i =  $lastChar+1;$i<$num;$i++) { 
     2851                  for ($i =  $lastChar+1;$i<$num;++$i) { 
    28522852 
    28532853                    $widths[] =  0; 
     
    28792879                if (!$this->isUnicode) { 
    28802880                  // With Unicode, widths array isn't used 
    2881                   for ($i =  $lastChar + 1; $i <=  $charNum; $i++) { 
     2881                  for ($i =  $lastChar + 1; $i <=  $charNum; ++$i) { 
    28822882 
    28832883                    $widths[] =  0; 
     
    33433343    $this->objects[$this->currentContents]['c'] .=  "\n".sprintf('%.3F', $a0) .' '.sprintf('%.3F', $b0) .' m '; 
    33443344 
    3345     for  ($i = 1; $i <=  $nSeg; $i++) { 
     3345    for  ($i = 1; $i <=  $nSeg; ++$i) { 
    33463346 
    33473347      // draw this bit of the total curve 
     
    35313531    if  ($this->nStateStack) { 
    35323532 
    3533       for  ($i =  1;$i <=  $this->nStateStack;$i++) { 
     3533      for  ($i =  1;$i <=  $this->nStateStack;++$i) { 
    35343534 
    35353535        $this->saveState($i); 
     
    37153715    $numbytes = 1; // number of octetc needed to represent the UTF-8 character 
    37163716     
    3717     for ($i = 0; $i < $length; $i++) { 
     3717    for ($i = 0; $i < $length; ++$i) { 
    37183718      $c = ord($text{$i}); // get one string character at time 
    37193719      if (count($bytes) == 0) { // get starting octect 
     
    37413741          // compose UTF-8 bytes to a single unicode value 
    37423742          $c = $bytes[0]; 
    3743           for ($j = 1; $j < $numbytes; $j++) { 
     3743          for ($j = 1; $j < $numbytes; ++$j) { 
    37443744            $c += ($bytes[$j] << (($numbytes - $j - 1) * 0x06)); 
    37453745          } 
     
    38663866    if  ($text[$j] ==  '<') { 
    38673867 
    3868       $j++; 
     3868      ++$j; 
    38693869 
    38703870      switch ($text[$j]) { 
     
    38723872      case  '/': 
    38733873 
    3874         $j++; 
     3874        ++$j; 
    38753875 
    38763876        if  (mb_strlen($text) <=  $j) { 
     
    38853885        case  'i': 
    38863886 
    3887           $j++; 
     3887          ++$j; 
    38883888 
    38893889          if  ($text[$j] ==  '>') { 
     
    39053905 
    39063906          // this this might be a callback function 
    3907           $j++; 
     3907          ++$j; 
    39083908 
    39093909          $k =  mb_strpos($text, '>', $j); 
     
    39923992      case  'i': 
    39933993 
    3994         $j++; 
     3994        ++$j; 
    39953995 
    39963996        if  ($text[$j] ==  '>') { 
     
    40104010 
    40114011        // this this might be a callback function 
    4012         $j++; 
     4012        ++$j; 
    40134013 
    40144014        $k =  mb_strpos($text, '>', $j); 
     
    41584158 
    41594159    /* 
    4160      for ($i = 0;$i<$len;$i++){ 
     4160     for ($i = 0;$i<$len;++$i){ 
    41614161     $f = 1; 
    41624162     $directive = 0; //$this->PRVTcheckTextDirective($text,$i,$f); 
     
    42824282      $len =  mb_strlen($text); 
    42834283 
    4284       for  ($i =  0; $i < $len; $i++) { 
     4284      for  ($i =  0; $i < $len; ++$i) { 
    42854285        $char =  ord($text{$i}); 
    42864286        // check if we have to replace character 
     
    44024402    $tw =  $width/$size*1000; 
    44034403 
    4404     for  ($i =  0;$i<$len;$i++) { 
     4404    for  ($i =  0;$i<$len;++$i) { 
    44054405 
    44064406      $f =  1; 
     
    48504850    $ret =  0; 
    48514851 
    4852     for  ($i =  0;$i<$num;$i++) { 
     4852    for  ($i =  0;$i<$num;++$i) { 
    48534853 
    48544854      $ret =  $ret*256; 
  • trunk/filemanager/tp/dompdf/www/test/long_table.php

    r3019 r7655  
    2525$j_max = 20; 
    2626 
    27 for ( $i = 1; $i <= $i_max; $i++): ?> 
     27for ( $i = 1; $i <= $i_max; ++$i): ?> 
    2828<tr> 
    2929<?php 
    30 for ( $j = 1; $j <= $j_max; $j++) { 
     30for ( $j = 1; $j <= $j_max; ++$j) { 
    3131  $r = (int)(255*$i / $i_max); 
    3232  $b = (int)(255*$j / $j_max); 
  • trunk/filemanager/tp/dompdf/www/test/php_test.php

    r3019 r7655  
    1515$max_x = $pdf->get_width() - 50; 
    1616$max_y = $pdf->get_height() - 50;  
    17 for ( $i = 0; $i < 30; $i++) { 
     17for ( $i = 0; $i < 30; ++$i) { 
    1818  $pdf->circle(rand(50, $max_x), rand(50, $max_y), rand(10, 70), 
    1919               array(rand()/getrandmax(), rand()/getrandmax(), rand()/getrandmax()), 
Note: See TracChangeset for help on using the changeset viewer.