Changeset 7655 for trunk/phpgwapi


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/phpgwapi
Files:
60 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/inc/class.accounts.inc.php

    r5141 r7655  
    283283                                                        $account_search[$serial]['data'][$id] = $data; 
    284284                                                } 
    285                                                 $n++; 
     285                                                ++$n; 
    286286                                        } 
    287287                                        $account_search[$serial]['total'] = $this->total; 
     
    436436                        $this->memberships = Array(); 
    437437 
    438                         for ($idx=0; $idx<count($security_equals); $idx++) 
     438                        for ($idx=0; $idx<count($security_equals); ++$idx) 
    439439                        { 
    440440                                $groups = (int)$security_equals[$idx]; 
     
    463463                        } 
    464464 
    465                         for ($idx=0; $idx<count($security_equals); $idx++) 
     465                        for ($idx=0; $idx<count($security_equals); ++$idx) 
    466466                        { 
    467467                                $name = $this->id2name((int)$security_equals[$idx]); 
  • trunk/phpgwapi/inc/class.accounts_contacts.inc.php

    r547 r7655  
    172172 
    173173                        /* get user information for each user/group */ 
    174                         for($i=0;$i<count($allValues);$i++) 
     174                        for($i=0;$i<count($allValues);++$i) 
    175175                        { 
    176176                                $accounts[] = Array( 
  • trunk/phpgwapi/inc/class.accounts_ldap.inc.php

    r5141 r7655  
    277277                                        $members = $this->member($this->account_id); 
    278278                                        $newData['memberuid'] = array(); 
    279                                         for($i=0;$i<count($members);$i++) 
     279                                        for($i=0;$i<count($members);++$i) 
    280280                                        { 
    281281                                                $currname = $this->id2name($members[$i]['account_id']); 
     
    308308                                        #_debug_array($members); 
    309309                                        $newData['memberuid'] = array(); 
    310                                         for($i=0;$i<count($members);$i++) 
     310                                        for($i=0;$i<count($members);++$i) 
    311311                                        { 
    312312                                                $currname = $this->id2name($members[$i]['account_id']); 
  • trunk/phpgwapi/inc/class.auth.inc.php

    r2 r7655  
    5555                        } 
    5656 
    57                         for ($i=0; $i<$size; $i++) 
     57                        for ($i=0; $i<$size; ++$i) 
    5858                        { 
    5959                                $s .= $random_char[mt_rand(1,61)]; 
  • trunk/phpgwapi/inc/class.categories.inc.php

    r4786 r7655  
    289289                                $cats[$i]['data']        = $this->db->f('cat_data'); 
    290290                                         
    291                                 $i++; 
     291                                ++$i; 
    292292                        } 
    293293 
    294294                        $num_cats = count($cats); 
    295                         for ($i=0;$i < $num_cats;$i++) 
     295                        for ($i=0;$i < $num_cats;++$i) 
    296296                        { 
    297297                                $sub_select = ' AND cat_parent=' . $cats[$i]['id'] . ' AND cat_level=' . ($cats[$i]['level']+1); 
     
    313313                                        $subcats[$j]['description'] = $this->db->f('cat_description'); 
    314314                                        $subcats[$j]['data']        = $this->db->f('cat_data'); 
    315                                         $j++; 
     315                                        ++$j; 
    316316                                } 
    317317 
     
    320320                                { 
    321321                                        $newcats = array(); 
    322                                         for ($k = 0; $k <= $i; $k++) 
     322                                        for ($k = 0; $k <= $i; ++$k) 
    323323                                        { 
    324324                                                $newcats[$k] = $cats[$k]; 
    325325                                        } 
    326                                         for ($k = 0; $k < $num_subcats; $k++) 
     326                                        for ($k = 0; $k < $num_subcats; ++$k) 
    327327                                        { 
    328328                                                $newcats[$k+$i+1] = $subcats[$k]; 
    329329                                        } 
    330                                         for ($k = $i+1; $k < $num_cats; $k++) 
     330                                        for ($k = $i+1; $k < $num_cats; ++$k) 
    331331                                        { 
    332332                                                $newcats[$k+$num_subcats] = $cats[$k]; 
     
    422422                        if($self) 
    423423                        { 
    424                                 for ($i=0;$i<count($cats);$i++) 
     424                                for ($i=0;$i<count($cats);++$i) 
    425425                                { 
    426426                                        if ($cats[$i]['id'] == $self) 
     
    441441                                        } 
    442442                                        $s .= '>'; 
    443                                         for ($j=0;$j<$cat['level'];$j++) 
     443                                        for ($j=0;$j<$cat['level'];++$j) 
    444444                                        { 
    445445                                                $s .= '&nbsp;'; 
     
    467467                                if ($this->total_records > 0) 
    468468                                { 
    469                                         for ($i=0;$i<count($cats);$i++) 
     469                                        for ($i=0;$i<count($cats);++$i) 
    470470                                        { 
    471471                                                $image_set = '&nbsp;'; 
     
    576576                                $new_parent = $this->id2name($cat_id,'parent'); 
    577577 
    578                                 for ($i=0;$i<count($cats);$i++) 
     578                                for ($i=0;$i<count($cats);++$i) 
    579579                                { 
    580580                                        if ($cats[$i]['level'] == 1) 
  • trunk/phpgwapi/inc/class.common.inc.php

    r5928 r7655  
    6262                        if($debug) { echo "<br>$regs[0] - $regs2[0]"; } 
    6363 
    64                         for($i=1;$i<5;$i++) 
     64                        for($i=1;$i<5;++$i) 
    6565                        { 
    6666                                if($debug) { echo "<br>$i: $regs[$i] - $regs2[$i]"; } 
     
    9393                        if($debug) { echo "<br>$regs[0] - $regs2[0]"; } 
    9494 
    95                         for($i=1;$i<6;$i++) 
     95                        for($i=1;$i<6;++$i) 
    9696                        { 
    9797                                if($debug) { echo "<br>$i: $regs[$i] - $regs2[$i]"; } 
     
    408408                        ); 
    409409 
    410                         for ($i=0; $i<$size; $i++) 
     410                        for ($i=0; $i<$size; ++$i) 
    411411                        { 
    412412                                $s .= $random_char[rand(1,61)]; 
     
    435435                        $html_error = '<table border="0" width="100%"><tr><td align="right"><b>' . lang($text) 
    436436                                . '</b>: </td><td align="left">' . $errors[0] . '</td></tr>'; 
    437                         for ($i=1; $i<count($errors); $i++) 
     437                        for ($i=1; $i<count($errors); ++$i) 
    438438                        { 
    439439                                $html_error .= '<tr><td>&nbsp;</td><td align="left">' . $errors[$i] . '</td></tr>'; 
     
    624624                                        } 
    625625                                } 
    626                                 $i++; 
     626                                ++$i; 
    627627                                $output_text .= "\n"; 
    628628                        } 
  • trunk/phpgwapi/inc/class.contacts.inc.php

    r2 r7655  
    262262                        } 
    263263 
    264                         for ($index = 0; $index < strlen ($s1); $index++) 
     264                        for ($index = 0; $index < strlen ($s1); ++$index) 
    265265                        { 
    266266                                /* $s1 comes after $s2 */ 
     
    286286                { 
    287287                        $lastindex = count($sortarray) - 2; 
    288                         for ($subindex = 0; $subindex < $lastindex; $subindex++) 
     288                        for ($subindex = 0; $subindex < $lastindex; ++$subindex) 
    289289                        { 
    290290                                $lastiteration = $lastindex - $subindex; 
    291                                 for ($iteration = 0; $iteration < $lastiteration; $iteration++) 
     291                                for ($iteration = 0; $iteration < $lastiteration; ++$iteration) 
    292292                                { 
    293293                                        $nextchar = 0; 
  • trunk/phpgwapi/inc/class.contacts_ldap.inc.php

    r6065 r7655  
    328328                                { 
    329329                                        $i=0; 
    330                                         for($i=0;$i<count($filterarray);$i++) 
     330                                        for($i=0;$i<count($filterarray);++$i) 
    331331                                        { 
    332332                                                list($name,$value) = preg_split('/=/',$filterarray[$i]); 
     
    482482                        @reset($ldap_fields); 
    483483                        $j = 0; 
    484                         for($i=$start;$i<$limit;$i++) 
     484                        for($i=$start;$i<$limit;++$i) 
    485485                        { 
    486486                                if($i<$this->total_records && $ldap_fields[$i]['uid'][0]) 
     
    510510                                                } 
    511511                                        } 
    512                                         $j++; 
     512                                        ++$j; 
    513513                                } 
    514514                        } 
  • trunk/phpgwapi/inc/class.contacts_sql.inc.php

    r2 r7655  
    614614                                        } 
    615615                                } 
    616                                 $i++; 
     616                                ++$i; 
    617617                        } 
    618618                        return $return_fields; 
  • trunk/phpgwapi/inc/class.crypto.inc.php

    r2 r7655  
    101101                                $x = strlen($iv); 
    102102                                        $this->iv = ''; 
    103                                 for($i = 0; $i < $ivsize; $i++) 
     103                                for($i = 0; $i < $ivsize; ++$i) 
    104104                                { 
    105105                                        $this->iv .= $iv[$i % $x]; 
     
    109109                                $x = strlen($key); 
    110110                                        $this->key = ''; 
    111                                 for($i = 0; $i < $keysize; $i++) 
     111                                for($i = 0; $i < $keysize; ++$i) 
    112112                                { 
    113113                                        $this->key .= $key[$i % $x]; 
  • trunk/phpgwapi/inc/class.date_time.inc.php

    r2 r7655  
    383383                        if($month > 2 && $this->is_leap_year($year)) 
    384384                        { 
    385                                 $julian++; 
     385                                ++$julian; 
    386386                        } 
    387387                        return($julian); 
  • trunk/phpgwapi/inc/class.error.inc.php

    r5281 r7655  
    4343                        $etext = $parms['text']; 
    4444                        $parray = Array(); 
    45                         for($counter=1;$counter<=10;$counter++) 
     45                        for($counter=1;$counter<=10;++$counter) 
    4646                        { 
    4747                                $str = 'p_'.$counter; 
  • trunk/phpgwapi/inc/class.errorlog.inc.php

    r370 r7655  
    124124 
    125125                        $errorstack = $this->errorstack; 
    126                         for ($i = 0; $i < count($errorstack); $i++) 
     126                        for ($i = 0; $i < count($errorstack); ++$i) 
    127127                        { 
    128128                                $err = $errorstack[$i]; 
     
    153153                        $new = array(); 
    154154                        reset($this->errorstack); 
    155                         for ($i = 0; $i < count($this->errorstack); $i++) 
     155                        for ($i = 0; $i < count($this->errorstack); ++$i) 
    156156                        { 
    157157                                $err = $this->errorstack[$i]; 
     
    182182 
    183183                        $errorstack = $this->errorstack; 
    184                         for ($i = 0; $i < count($errorstack); $i++) 
     184                        for ($i = 0; $i < count($errorstack); ++$i) 
    185185                        { 
    186186                                $err = $errorstack[$i]; 
  • trunk/phpgwapi/inc/class.gdgraph.inc.php

    r2 r7655  
    119119                        // Draw dashed lines for x axis 
    120120                        $linespace = ($this->graph_width - $this->margin_left - $this->margin_right) / ($this->num_lines_x - 1); 
    121                         for ($i = 1; $i < $this->num_lines_x; $i++) 
     121                        for ($i = 1; $i < $this->num_lines_x; ++$i) 
    122122                        { 
    123123                                $x = $i * $linespace + $this->margin_left; 
     
    130130                        // Draw dashed lines for y axis 
    131131                        $linespace = ($this->graph_height - $this->margin_top - $this->margin_bottom) / ($this->num_lines_y - 1); 
    132                         for ($i = 1; $i < $this->num_lines_y; $i++) 
     132                        for ($i = 1; $i < $this->num_lines_y; ++$i) 
    133133                        { 
    134134                                $y = $this->graph_height - $this->margin_bottom - ($i * $linespace); 
     
    174174                                $this->img->MoveTo($i * $linespace + $this->margin_left, $this->graph_height - $this->margin_bottom + 8); 
    175175                                $this->img->DrawText(array('text' => $text['date_formatted'])); 
    176                                 $i++; 
     176                                ++$i; 
    177177                        } 
    178178 
     
    223223                                        } 
    224224 
    225                                         for($y=0;$y<$largest;$y++) 
     225                                        for($y=0;$y<$largest;++$y) 
    226226                                        { 
    227227                                                if($line['sdate'] == $this->line_captions_x[$y]['date']) 
     
    249249                                elseif($line['edate'] <= $this->line_captions_x[$largest]['date'] && $line['edate'] >= $this->line_captions_x[0]['date']) 
    250250                                { 
    251                                         for($y=0;$y<$largest;$y++) 
     251                                        for($y=0;$y<$largest;++$y) 
    252252                                        { 
    253253                                                if($line['edate'] == $this->line_captions_x[$y]['date']) 
     
    262262                                } 
    263263 
    264                                 for ($w = -3; $w < 4; $w++) 
     264                                for ($w = -3; $w < 4; ++$w) 
    265265                                { 
    266266                                        $this->img->Line(1+$x1,$y1+$w,$x2,$y2+$w); 
    267267                                } 
    268                                 $color_index++; 
    269                                 $i++; 
     268                                ++$color_index; 
     269                                ++$i; 
    270270                        } 
    271271                        // Draw the y axis text 
     
    274274                        $linespace = ($this->graph_height - $this->margin_top - $this->margin_bottom) / ($this->num_lines_y - 1); 
    275275                        $space = 1; 
    276                         for ($i = 0;$i<count($this->data);$i++) 
     276                        for ($i = 0;$i<count($this->data);++$i) 
    277277                        { 
    278278                                $y = $this->graph_height - $this->margin_bottom - ($space * $linespace) - 7; 
    279279                                $this->img->MoveTo($this->margin_left - 6, $y); 
    280280                                $this->img->DrawText(array('text' => $this->data[$i]['title'],'justification' => 'right','margin_left' => $this->margin_left)); 
    281                                 $space++; 
     281                                ++$space; 
    282282                        } 
    283283 
  • trunk/phpgwapi/inc/class.jscalendar.inc.php

    r6063 r7655  
    162162                                        { 
    163163                                                $partcial_match = 0; 
    164                                                 for($i = 1; $i <= 12; $i++) 
     164                                                for($i = 1; $i <= 12; ++$i) 
    165165                                                { 
    166166                                                        $long_name  = lang(adodb_date('F',mktime(12,0,0,$i,1,2000))); 
  • trunk/phpgwapi/inc/class.listbox.inc.php

    r2 r7655  
    7272                                $this->p->parse('row','portal_listbox_header',True); 
    7373 
    74                                 for ($x = 0; $x < count($this->data); $x++) 
     74                                for ($x = 0; $x < count($this->data); ++$x) 
    7575                                { 
    7676                                        $var = Array( 
  • trunk/phpgwapi/inc/class.log.inc.php

    r2 r7655  
    9292 
    9393                        $errorstack = $this->errorstack; 
    94                         for ($i = 0; $i < count($errorstack); $i++) 
     94                        for ($i = 0; $i < count($errorstack); ++$i) 
    9595                        { 
    9696                                $err = $errorstack[$i]; 
     
    115115                        $new = array(); 
    116116                        reset($this->errorstack); 
    117                         for ($i = 0; $i < count($this->errorstack); $i++) 
     117                        for ($i = 0; $i < count($this->errorstack); ++$i) 
    118118                        { 
    119119                                $err = $this->errorstack[$i]; 
     
    141141 
    142142                        $errorstack = $this->errorstack; 
    143                         for ($i = 0; $i < count($errorstack); $i++) 
     143                        for ($i = 0; $i < count($errorstack); ++$i) 
    144144                        { 
    145145                                $err = $errorstack[$i]; 
  • trunk/phpgwapi/inc/class.matrixview.inc.php

    r2 r7655  
    6161                function matrixview ($month_int = 0, $year_int = 0) 
    6262                { 
    63                         for($i;$i<32;$i++) 
     63                        for($i;$i<32;++$i) 
    6464                        { 
    6565                                if(checkdate($month_int,$i,$year_int)) $days++; 
     
    131131                                        $go = 0; 
    132132                                } 
    133                                 $i++; 
     133                                ++$i; 
    134134                        } 
    135135                 
     
    211211 
    212212                        // loop through number of items 
    213                         for($z=0;$z<$this->items_count;$z++) 
     213                        for($z=0;$z<$this->items_count;++$z) 
    214214                        { 
    215215                                // seperate color and name from first array element 
     
    222222 
    223223                                // loop through days of desired month 
    224                                 for($r=1;$r<$this->sumdays+1;$r++) 
     224                                for($r=1;$r<$this->sumdays+1;++$r) 
    225225                                { 
    226226                                        if($this->items_content[$z][$r] == 'x') 
     
    258258                        echo '<td>' . lang('Title') . '</td>' . "\n"; 
    259259 
    260                         for($i=1;$i<$this->sumdays+1;$i++) 
     260                        for($i=1;$i<$this->sumdays+1;++$i) 
    261261                        { 
    262262                                echo '<td bgcolor="'; echo $this->color_headerfield; echo '">' . sprintf("%02d",$i) . '</td>' . "\n"; 
     
    302302                                echo '<select name="month"';  
    303303 
    304                                 for($i=0;$i<13;$i++) 
     304                                for($i=0;$i<13;++$i) 
    305305                                { 
    306306                                        if ($this->month == $i) 
     
    318318                                echo '<select name="year"'; 
    319319 
    320                                 for($i = date('Y') -2;$i<date('Y')+5;$i++) 
     320                                for($i = date('Y') -2;$i<date('Y')+5;++$i) 
    321321                                { 
    322322                                        if($this->year == $i) 
  • trunk/phpgwapi/inc/class.net_http_client.inc.php

    r6057 r7655  
    816816 
    817817                                        sleep(0.1); 
    818                                         $failureCount++; 
     818                                        ++$failureCount; 
    819819                                        //print "elapsed ".(time()-$ts)."<br>"; 
    820820                                } 
  • trunk/phpgwapi/inc/class.network.inc.php

    r5915 r7655  
    221221                                                } 
    222222                                                $lines[] = $line; 
    223                                                 $i++; 
     223                                                ++$i; 
    224224                                        } 
    225225                                        $this->close_port(); 
  • trunk/phpgwapi/inc/class.nextmatchs.inc.php

    r3893 r7655  
    434434                        while($GLOBALS['phpgw']->db->next_record()) 
    435435                        { 
    436                                 $index++; 
     436                                ++$index; 
    437437                                $filter_obj[$index][0] = $GLOBALS['phpgw']->db->f($idxfieldname); 
    438438                                $filter_obj[$index][1] = $GLOBALS['phpgw']->db->f($strfieldname); 
     
    453453                        { 
    454454                                $indexlimit = count($search_obj); 
    455                                 for ($index=0; $index<$indexlimit; $index++) 
     455                                for ($index=0; $index<$indexlimit; ++$index) 
    456456                                { 
    457457                                        if ($this->_qfield == '') 
     
    510510                                        } 
    511511 
    512                                         for ($index=0; $index<$indexlimit; $index++) 
     512                                        for ($index=0; $index<$indexlimit; ++$index) 
    513513                                        { 
    514514                                                $filter_obj[2+$index][0] = $user_groups[$index]['account_id']; 
     
    523523                                $indexlimit = count($filter_obj); 
    524524 
    525                                 for ($index=0; $index<$indexlimit; $index++) 
     525                                for ($index=0; $index<$indexlimit; ++$index) 
    526526                                { 
    527527                                        if ($this->_filter == '') 
     
    583583                        $indexlimit = count($filter_obj); 
    584584 
    585                         for($index=0; $index<$indexlimit; $index++) 
     585                        for($index=0; $index<$indexlimit; ++$index) 
    586586                        { 
    587587                                if($filter == '') 
  • trunk/phpgwapi/inc/class.phpmailer.inc.php

    r5509 r7655  
    443443    function MailSend($header, $body) { 
    444444        $to = ""; 
    445         for($i = 0; $i < count($this->to); $i++) 
     445        for($i = 0; $i < count($this->to); ++$i) 
    446446        { 
    447447            if($i != 0) { $to .= ", "; } 
     
    497497 
    498498        // Attempt to send attach all recipients 
    499         for($i = 0; $i < count($this->to); $i++) 
     499        for($i = 0; $i < count($this->to); ++$i) 
    500500        { 
    501501            if(!$this->smtp->Recipient($this->to[$i][0])) 
    502502                $bad_rcpt[] = $this->to[$i][0]; 
    503503        } 
    504         for($i = 0; $i < count($this->cc); $i++) 
     504        for($i = 0; $i < count($this->cc); ++$i) 
    505505        { 
    506506            if(!$this->smtp->Recipient($this->cc[$i][0])) 
    507507                $bad_rcpt[] = $this->cc[$i][0]; 
    508508        } 
    509         for($i = 0; $i < count($this->bcc); $i++) 
     509        for($i = 0; $i < count($this->bcc); ++$i) 
    510510        { 
    511511            if(!$this->smtp->Recipient($this->bcc[$i][0])) 
     
    515515        if(count($bad_rcpt) > 0) // Create error message 
    516516        { 
    517             for($i = 0; $i < count($bad_rcpt); $i++) 
     517            for($i = 0; $i < count($bad_rcpt); ++$i) 
    518518            { 
    519519                if($i != 0) { $error .= ", "; } 
     
    584584                $connection = true; 
    585585            } 
    586             $index++; 
     586            ++$index; 
    587587        } 
    588588        if(!$connection) 
     
    645645        if(count($addr) > 1) 
    646646        { 
    647             for($i = 1; $i < count($addr); $i++) 
     647            for($i = 1; $i < count($addr); ++$i) 
    648648                $addr_str .= ", " . $this->AddrFormat($addr[$i]); 
    649649        } 
     
    686686        $line = explode($this->LE, $message); 
    687687        $message = ""; 
    688         for ($i=0 ;$i < count($line); $i++) 
     688        for ($i=0 ;$i < count($line); ++$i) 
    689689        { 
    690690          $line_part = explode(" ", $line[$i]); 
    691691          $buf = ""; 
    692           for ($e = 0; $e<count($line_part); $e++) 
     692          for ($e = 0; $e<count($line_part); ++$e) 
    693693          { 
    694694              $word = $line_part[$e]; 
     
    830830 
    831831        // Add custom headers 
    832         for($index = 0; $index < count($this->CustomHeader); $index++) 
     832        for($index = 0; $index < count($this->CustomHeader); ++$index) 
    833833        { 
    834834            $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]),  
     
    10531053 
    10541054        // Add all attachments 
    1055         for($i = 0; $i < count($this->attachment); $i++) 
     1055        for($i = 0; $i < count($this->attachment); ++$i) 
    10561056        { 
    10571057            // Check for string attachment 
     
    13261326    function InlineImageExists() { 
    13271327        $result = false; 
    1328         for($i = 0; $i < count($this->attachment); $i++) 
     1328        for($i = 0; $i < count($this->attachment); ++$i) 
    13291329        { 
    13301330            if($this->attachment[$i][6] == "inline") 
  • trunk/phpgwapi/inc/class.preferences.inc.php

    r3043 r7655  
    953953                        #$avail_pref_array = $bo_mail_prefs->std_prefs; 
    954954                        #$c_cust_prefs = count($bo_mail_prefs->cust_prefs); 
    955                         #for($i=0;$i<$c_cust_prefs;$i++) 
     955                        #for($i=0;$i<$c_cust_prefs;++$i) 
    956956                        #{ 
    957957                        #       // add each custom prefs to the std prefs array 
     
    989989                        // --- loop thru $avail_pref_array and process each pref item --- 
    990990                        $c_prefs = count($avail_pref_array); 
    991                         for($i=0;$i<$c_prefs;$i++) 
     991                        for($i=0;$i<$c_prefs;++$i) 
    992992                        { 
    993993                                $this_avail_pref = $avail_pref_array[$i]; 
  • trunk/phpgwapi/inc/class.resultbox.inc.php

    r2 r7655  
    5454                        echo '<table border="0" cellpadding="0" cellspacing="0" width="'.$this->getvar('innerwidth') 
    5555                                . '" bgcolor="' . $this->getvar('innerbgcolor') . '">'; 
    56                         for ($x = 0; $x < count($this->data); $x++) 
     56                        for ($x = 0; $x < count($this->data); ++$x) 
    5757                        { 
    5858                                echo '<tr>'; 
  • trunk/phpgwapi/inc/class.sbox.inc.php

    r5912 r7655  
    7575                        $t_s[$selected] = ' selected'; 
    7676 
    77                         for ($i=0; $i<24; $i++) 
     77                        for ($i=0; $i<24; ++$i) 
    7878                        { 
    7979                                $s .= '<option value="' . $i . '"' . $t_s[$i] . '>' 
     
    8989                        $s = '<select name="' . $name . '">'; 
    9090                        $t_s[$selected] = " selected"; 
    91                         for ($i=1; $i<13; $i++) 
     91                        for ($i=1; $i<13; ++$i) 
    9292                        { 
    9393                                $s .= '<option value="' . $i . '"' . $t_s[$i] . '>' 
     
    106106                        $t_s[$selected] = " selected"; 
    107107 
    108                         for ($i=0; $i<60; $i++) 
     108                        for ($i=0; $i<60; ++$i) 
    109109                        { 
    110110                                $s .= '<option value="' . $i . '"' . $t_s[sprintf("%02d",$i)] . '>' . sprintf("%02d",$i) . '</option>'; 
     
    139139                { 
    140140                        $out = ''; 
    141                         for($i=0;$i<count($this->weekdays);$i++) 
     141                        for($i=0;$i<count($this->weekdays);++$i) 
    142142                        { 
    143143                                $out .= '<option value="'.$i.'"'.($selected!=$i?'':' selected').'>'.($this->weekdays[$i]!=''?lang($this->weekdays[$i]):'').'</option>'."\n"; 
     
    148148                function nr2weekday($selected = 0) 
    149149                { 
    150                         for($i=0;$i<count($this->weekdays);$i++) 
     150                        for($i=0;$i<count($this->weekdays);++$i) 
    151151                        { 
    152152                                if ($selected > 0 && $selected == $i) 
     
    161161                        $out = ''; 
    162162                        $c_monthnames = count($this->monthnames); 
    163                         for($i=0;$i<$c_monthnames;$i++) 
     163                        for($i=0;$i<$c_monthnames;++$i) 
    164164                        { 
    165165                                $out .= '<option value="'.$i.'"'.($selected!=$i?'':' selected').'>'.($this->monthnames[$i]!=''?lang($this->monthnames[$i]):'').'</option>'."\n"; 
     
    171171                { 
    172172                        $out = ''; 
    173                         for($i=0;$i<=12;$i++) 
     173                        for($i=0;$i<=12;++$i) 
    174174                        { 
    175175                                $out .= '<option value="'.$i.'"'.($selected!=$i?'':' selected').'>'.($i?$i:'').'</option>'."\n"; 
     
    183183                        $out = ''; 
    184184 
    185                         for($i=0;$i<32;$i++) 
     185                        for($i=0;$i<32;++$i) 
    186186                        { 
    187187                                $out .= '<option value="'.($i?$i:'').'"'.($selected!=$i?'':' selected').'>'.($i?$i:'').'</option>'."\n"; 
     
    214214 
    215215                        // We need to add some good error checking here. 
    216                         for ($i=$startYear;$i<$endyear; $i++) 
     216                        for ($i=$startYear;$i<$endyear; ++$i) 
    217217                        { 
    218218                                $out .= '<option value="'.$i.'"'; 
     
    251251                        $out = '<select name="' . $name . '">'; 
    252252 
    253                         for($i=1;$i<count($arr);$i++) 
     253                        for($i=1;$i<count($arr);++$i) 
    254254                        { 
    255255                                $out .= "<option value=\""; 
     
    304304                                if(@is_array($selected)) 
    305305                                { 
    306                                         for($i=0;$i<count($selected);$i++) 
     306                                        for($i=0;$i<count($selected);++$i) 
    307307                                        { 
    308308                                                if ($group['account_id'] == $selected[$i]) 
  • trunk/phpgwapi/inc/class.schema_proc_pgsql.inc.php

    r5934 r7655  
    385385                        { 
    386386                                $aIx[$i] = trim($ix); 
    387                                 $i++; 
     387                                ++$i; 
    388388                        } 
    389389                        /* Restore original value */ 
     
    409409 
    410410                                        $sSQL .= $name; 
    411                                         $i++; 
     411                                        ++$i; 
    412412                                } 
    413413 
     
    444444                                                } 
    445445                                        } 
    446                                         $i++; 
     446                                        ++$i; 
    447447                                } 
    448448                                $sSQL .= ')'; 
  • trunk/phpgwapi/inc/class.sector_search_ldap.inc.php

    r5773 r7655  
    6565        $info = ldap_get_entries($this->ldap_connection, $sr); 
    6666 
    67         for ($i = 0; $i < $info["count"]; $i++) { 
    68             $level++; 
     67        for ($i = 0; $i < $info["count"]; ++$i) { 
     68            ++$level; 
    6969            $next_ldap_context[$i] = $info[$i]["dn"]; 
    7070 
     
    9090        } else { 
    9191 
    92             for ($i = 0; $i < $info["count"]; $i++) { 
     92            for ($i = 0; $i < $info["count"]; ++$i) { 
    9393                $sectors_list[$i] = $info[$i]["ou"][0]; 
    9494            } 
     
    138138        } 
    139139 
    140         for ($i = 0; $i < $info["count"]; $i++) { 
     140        for ($i = 0; $i < $info["count"]; ++$i) { 
    141141            $dn = $info[$i]["dn"]; 
    142142 
     
    172172                    $display .= '+'; 
    173173                else { 
    174                     for ($i = 0; $i < $level; $i++) 
     174                    for ($i = 0; $i < $level; ++$i) 
    175175                        $display .= '---'; 
    176176                } 
     
    230230        } 
    231231 
    232         for ($i = 0; $i < $info["count"]; $i++) { 
     232        for ($i = 0; $i < $info["count"]; ++$i) { 
    233233            $dn = trim(strtolower($info[$i]['dn'])); 
    234234            if ($dn == $selected) 
  • trunk/phpgwapi/inc/class.sessions.inc.php

    r6435 r7655  
    388388                                $ip_exploded = explode(",",$ip); 
    389389                                $ip = ""; 
    390                                 for($i=0;$i<2;$i++) 
     390                                for($i=0;$i<2;++$i) 
    391391                                        $ip .= isset($ip_exploded[$i])?(($i==1?",":"").trim($ip_exploded[$i])):(""); 
    392392                                if(strlen($ip)>30) 
     
    11901190 
    11911191                                        $new_extravars[$b[0]] = $b[1]; 
    1192                                         $i++; 
     1192                                        ++$i; 
    11931193                                } 
    11941194                                $extravars = $new_extravars; 
  • trunk/phpgwapi/inc/class.setup.inc.php

    r3626 r7655  
    710710                        $less = 0; 
    711711 
    712                         for($i=0;$i<count($testa);$i++) 
     712                        for($i=0;$i<count($testa);++$i) 
    713713                        { 
    714714                                if($DEBUG) { echo'<br>Checking if '. (int)$testa[$i] . ' is less than ' . (int)$testb[$i] . ' ...'; } 
     
    716716                                { 
    717717                                        if ($DEBUG) { echo ' yes.'; } 
    718                                         $less++; 
     718                                        ++$less; 
    719719                                        if($i<3) 
    720720                                        { 
     
    792792                        $less = 0; 
    793793 
    794                         for($i=0;$i<count($testa);$i++) 
     794                        for($i=0;$i<count($testa);++$i) 
    795795                        { 
    796796                                if($DEBUG) { echo'<br>Checking if '. (int)$testa[$i] . ' is more than ' . (int)$testb[$i] . ' ...'; } 
     
    798798                                { 
    799799                                        if($DEBUG) { echo ' yes.'; } 
    800                                         $less++; 
     800                                        ++$less; 
    801801                                        if($i<3) 
    802802                                        { 
  • trunk/phpgwapi/inc/class.setup_detection.inc.php

    r5781 r7655  
    427427                                                else 
    428428                                                { 
    429                                                         $none++; 
     429                                                        ++$none; 
    430430                                                } 
    431431                                        } 
  • trunk/phpgwapi/inc/class.setup_process.inc.php

    r6737 r7655  
    160160                                } 
    161161 
    162                                 $i++; 
     162                                ++$i; 
    163163                                if($i == 20) /* Then oops it broke */ 
    164164                                { 
  • trunk/phpgwapi/inc/class.soap_server.inc.php

    r5934 r7655  
    359359                                                } 
    360360                                                // validate each param's type 
    361                                                 for($i=0; $i < count($p); $i++) 
     361                                                for($i=0; $i < count($p); ++$i) 
    362362                                                { 
    363363                                                        // type not match 
  • trunk/phpgwapi/inc/class.translation_sql.inc.php

    r3442 r7655  
    4848                function translation($warnings = False) 
    4949                { 
    50                         for ($i = 1; $i <= 9; $i++) 
     50                        for ($i = 1; $i <= 9; ++$i) 
    5151                        { 
    5252                                $this->placeholders[] = '%'.$i; 
  • trunk/phpgwapi/inc/class.vcard.inc.php

    r6057 r7655  
    560560                                                                $namel = 'n_' . $myname; 
    561561                                                                $entry[$namel] = $values[$j]; 
    562                                                                 $j++; 
     562                                                                ++$j; 
    563563                                                        } 
    564564                                                        break; 
     
    624624                // Takes an array of contacts class fields/values, turns it into a vcard string: 
    625625                // 
    626                 // for($i=0;$i<count($buffer);$i++) 
     626                // for($i=0;$i<count($buffer);++$i) 
    627627                // { 
    628628                //     $vcards .= $this->vcard->out($buffer[$i]); 
  • trunk/phpgwapi/inc/class.vfs_dav.inc.php

    r6057 r7655  
    626626                        $count = count ($rarray); 
    627627                        reset ($rarray); 
    628                         for ($i = 0; (list ($key, $value) = each ($rarray)) && $i != $count; $i++) 
     628                        for ($i = 0; (list ($key, $value) = each ($rarray)) && $i != $count; ++$i) 
    629629                        { 
    630630                                $rarray[$key . '_clean'] = $this->db_clean (array ('string' => $value)); 
     
    23702370                        $ext=$parts[(sizeof($parts)-1)]; 
    23712371 
    2372                         for($i=0;$i<sizeof($contents);$i++) 
     2372                        for($i=0;$i<sizeof($contents);++$i) 
    23732373                        { 
    23742374                                if (!preg_match('/^#/',$contents[$i])) 
     
    23772377                                        if (sizeof($line) >= 2) 
    23782378                                        { 
    2379                                                 for($j=1;$j<sizeof($line);$j++) 
     2379                                                for($j=1;$j<sizeof($line);++$j) 
    23802380                                                { 
    23812381                                                        if($line[$j] == $ext) 
     
    26182618                                foreach ( $prop as $key=>$value) 
    26192619                                { 
    2620                                         $id++; 
     2620                                        ++$id; 
    26212621                                        $new_key =  substr($value[$data['orderby']].'        ',0, 8); 
    26222622                                        $tmp_prop[strtolower($new_key).'_'.$id] = $value; 
     
    26932693                                foreach ( $prop as $key=>$value) 
    26942694                                { 
    2695                                         $id++; 
     2695                                        ++$id; 
    26962696                                        $new_key =  substr($value[$data['orderby']].'        ',0, 8); 
    26972697                                        $tmp_prop[strtolower($new_key).'_'.$id] = $value; 
     
    28042804                        } 
    28052805 
    2806                         for ($i = 1; $i != ($arg_info['params'] + 1); $i++) 
     2806                        for ($i = 1; $i != ($arg_info['params'] + 1); ++$i) 
    28072807                        { 
    28082808                                if (substr ($argv[$i], 0, 1) == '/') 
     
    28442844                { 
    28452845                  if(!is_array($data)) $data=array(); 
    2846                         for ($i = 0; list ($key, $value) = each ($default_values); $i++) 
     2846                        for ($i = 0; list ($key, $value) = each ($default_values); ++$i) 
    28472847                        { 
    28482848                                if (!isset ($data[$key])) 
  • trunk/phpgwapi/inc/class.vfs_shared.inc.php

    r6057 r7655  
    793793                        $ext=$parts[(sizeof($parts)-1)]; 
    794794 
    795                         for($i=0;$i<sizeof($contents);$i++) 
     795                        for($i=0;$i<sizeof($contents);++$i) 
    796796                        { 
    797797                                if (!preg_match('/^#/',$contents[$i])) 
     
    800800                                        if (sizeof($line) >= 2) 
    801801                                        { 
    802                                                 for($j=1;$j<sizeof($line);$j++) 
     802                                                for($j=1;$j<sizeof($line);++$j) 
    803803                                                { 
    804804                                                        if($line[$j] == $ext) 
     
    10531053                        $count = count ($rarray); 
    10541054                        reset ($rarray); 
    1055                         for ($i = 0; (list ($key, $value) = each ($rarray)) && $i != $count; $i++) 
     1055                        for ($i = 0; (list ($key, $value) = each ($rarray)) && $i != $count; ++$i) 
    10561056                        { 
    10571057                                $rarray[$key . '_clean'] = $this->clean_string (array ('string' => $value)); 
     
    13241324                        } 
    13251325 
    1326                         for ($i = 1; $i != ($arg_info['params'] + 1); $i++) 
     1326                        for ($i = 1; $i != ($arg_info['params'] + 1); ++$i) 
    13271327                        { 
    13281328                                if (substr ($argv[$i], 0, 1) == "/") 
     
    13631363                function default_values ($data, $default_values) 
    13641364                { 
    1365                         for ($i = 0; list ($key, $value) = each ($default_values); $i++) 
     1365                        for ($i = 0; list ($key, $value) = each ($default_values); ++$i) 
    13661366                        { 
    13671367                                if (!isset ($data[$key])) 
  • trunk/phpgwapi/inc/class.vfs_sql.inc.php

    r6057 r7655  
    242242                        $sql2 .= ' VALUES ('; 
    243243 
    244                         for ($i = 0; list ($attribute, $value) = each ($file_array); $i++) 
     244                        for ($i = 0; list ($attribute, $value) = each ($file_array); ++$i) 
    245245                        { 
    246246                                if ($attribute == 'file_id' || $attribute == 'content') 
     
    357357                                        } 
    358358 
    359                                         for ($i = 0; $i < $newnumofparts; $i++) 
     359                                        for ($i = 0; $i < $newnumofparts; ++$i) 
    360360                                        { 
    361361                                                if (!isset ($version_parts[$i])) 
     
    22222222                                        $sql .= $attribute.'=' .$GLOBALS['phpgw']->db->quote($data['attributes'][$attribute],$this->column_defs[$attribute]['type']); 
    22232223 
    2224                                         $change_attributes++; 
     2224                                        ++$change_attributes; 
    22252225                                } 
    22262226                        } 
     
    28632863 
    28642864                        $rarray = array (); 
    2865                         for ($i = 0; $GLOBALS['phpgw']->db->next_record (); $i++) 
     2865                        for ($i = 0; $GLOBALS['phpgw']->db->next_record (); ++$i) 
    28662866                        { 
    28672867                                $record = $GLOBALS['phpgw']->db->Record; 
  • trunk/phpgwapi/inc/class.xml.inc.php

    r6037 r7655  
    291291         
    292292        // Calculate the amount of whitespaces to display. 
    293         for ( $i = 0; $i < ( $level * 2 ); $i++ ) 
     293        for ( $i = 0; $i < ( $level * 2 ); ++$i ) 
    294294        { 
    295295            // Add a whitespaces to the string. 
     
    377377            { 
    378378                // Run through all children with the same name. 
    379                 for ( $i = 1; $i <= $pos; $i++ ) 
     379                for ( $i = 1; $i <= $pos; ++$i ) 
    380380                { 
    381381                    // Generate the full path of the child. 
     
    552552             
    553553            // Now run through the siblings. 
    554             for ( $i = 1; $i <= $siblings; $i++ ) 
     554            for ( $i = 1; $i <= $siblings; ++$i ) 
    555555            { 
    556556                // Create the name of the sibling. 
     
    564564                     
    565565                    // Increase the counter. 
    566                     $counter++; 
     566                    ++$counter; 
    567567                     
    568568                    // Add the old and the new name to the list of nodes 
     
    12151215         
    12161216        // Run through the string. 
    1217         for ( $i = 0; $i < strlen($term); $i++ ) 
     1217        for ( $i = 0; $i < strlen($term); ++$i ) 
    12181218        { 
    12191219            // Get the character at the position of the string. 
     
    12241224            { 
    12251225                // Increase the number of brackets. 
    1226                 $brackets++; 
     1226                ++$brackets; 
    12271227            } 
    12281228            elseif ( ( $character == ")" ) || ( $character == "]" ) ) 
     
    19221922            { 
    19231923                // Run through all childs with this name. 
    1924                 for ( $i = 1; $i <= $child_position; $i++ ) 
     1924                for ( $i = 1; $i <= $child_position; ++$i ) 
    19251925                { 
    19261926                    // Create the path of the child. 
     
    20762076            { 
    20772077                // Run through all children of this name. 
    2078                 for ( $i = 1; $i <= $child_position; $i++ ) 
     2078                for ( $i = 1; $i <= $child_position; ++$i ) 
    20792079                { 
    20802080                    // Create the full path for the children. 
     
    26692669             
    26702670        // Run through each argument and evaluate it. 
    2671         for ( $i = 0; $i < sizeof($arguments); $i++ ) 
     2671        for ( $i = 0; $i < sizeof($arguments); ++$i ) 
    26722672        { 
    26732673            // Trim each argument. 
     
    28402840             
    28412841        // Run through all arguments. 
    2842         for ( $i = 0; $i < sizeof($arguments); $i++ ) 
     2842        for ( $i = 0; $i < sizeof($arguments); ++$i ) 
    28432843        { 
    28442844            // Trim the string. 
     
    29112911         
    29122912        // Run through all arguments. 
    2913         for ( $i = 0; $i < sizeof($arguments); $i++ ) 
     2913        for ( $i = 0; $i < sizeof($arguments); ++$i ) 
    29142914        { 
    29152915            // Trim the argument. 
     
    33713371                         
    33723372                        // Run through the array of arguments. 
    3373                         for ( $i = 1; $i < sizeof($arguments); $i++ ) 
     3373                        for ( $i = 1; $i < sizeof($arguments); ++$i ) 
    33743374                        { 
    33753375                                // Add the number of the argument to the command. 
  • trunk/phpgwapi/inc/class.xmlrpc_server_epi.inc.php

    r5912 r7655  
    109109                        return array(1); 
    110110 
    111                         for($i=0; $i<sizeof($sig); $i++) 
     111                        for($i=0; $i<sizeof($sig); ++$i) 
    112112                        { 
    113113                                // check each possible signature in turn 
     
    116116                                { 
    117117                                        $itsOK = 1; 
    118                                         for($n=0; $n<$in->getNumParams(); $n++) 
     118                                        for($n=0; $n<$in->getNumParams(); ++$n) 
    119119                                        { 
    120120                                                $p = $in->getParam($n); 
  • trunk/phpgwapi/inc/class.xmlrpc_server_php.inc.php

    r5912 r7655  
    144144                function verifySignature($in, $sig) 
    145145                { 
    146                         for($i=0; $i<sizeof($sig); $i++) 
     146                        for($i=0; $i<sizeof($sig); ++$i) 
    147147                        { 
    148148                                // check each possible signature in turn 
     
    151151                                { 
    152152                                        $itsOK = 1; 
    153                                         for($n=0; $n<$in->getNumParams(); $n++) 
     153                                        for($n=0; $n<$in->getNumParams(); ++$n) 
    154154                                        { 
    155155                                                $p = $in->getParam($n); 
     
    301301                                // now add parameters in 
    302302                                $plist = ''; 
    303                                 for($i=0; $i<sizeof($GLOBALS['_xh'][$parser]['params']); $i++) 
     303                                for($i=0; $i<sizeof($GLOBALS['_xh'][$parser]['params']); ++$i) 
    304304                                { 
    305305                                        //print "<!-- " . $GLOBALS['_xh'][$parser]['params'][$i]. "-->\n"; 
  • trunk/phpgwapi/inc/class.xmlrpcmsg.inc.php

    r6057 r7655  
    4242                        if (is_array($pars) && sizeof($pars)>0) 
    4343                        { 
    44                                 for($i=0; $i<sizeof($pars); $i++)  
     44                                for($i=0; $i<sizeof($pars); ++$i) 
    4545                                { 
    4646                                        $this->addParam($pars[$i]); 
     
    6666                        { 
    6767                                $this->payload .= '<params>' . "\n"; 
    68                                 for($i=0; $i<sizeof($this->params); $i++) 
     68                                for($i=0; $i<sizeof($this->params); ++$i) 
    6969                                { 
    7070                                        $p = $this->params[$i]; 
     
    174174                                $newdata = ''; 
    175175                                $hdrfnd  = 0; 
    176                                 for ($i=0; $i<sizeof($ar); $i++) 
     176                                for ($i=0; $i<sizeof($ar); ++$i) 
    177177                                { 
    178178                                        if (!$hdrfnd) 
  • trunk/phpgwapi/inc/class.xmlrpcval.inc.php

    r5509 r7655  
    184184                                                // array 
    185185                                                $rs .= '<array>'."\n".'<data>'."\n"; 
    186                                                 for($i=0; $i<sizeof($val); $i++) 
     186                                                for($i=0; $i<sizeof($val); ++$i) 
    187187                                                { 
    188188                                                        $rs .= $this->serializeval($val[$i]); 
  • trunk/phpgwapi/inc/common_functions.inc.php

    r6057 r7655  
    208208                /* the default values                                          */ 
    209209                $num = count($expected); 
    210                 for ($i = 0; $i < $num; $i++) 
     210                for ($i = 0; $i < $num; ++$i) 
    211211                { 
    212212                        $args[$expected[$i]['name']] = $expected[$i]['default']; 
     
    224224                        if(!is_array($recieved[0])) 
    225225                        { 
    226                         for ($i = 0; $i < $num; $i++) 
     226                        for ($i = 0; $i < $num; ++$i) 
    227227                                { 
    228228                                        if(isset($recieved[$i]) && $recieved[$i] !== '##DEFAULT##') 
     
    244244                        else 
    245245                        { 
    246                                 for ($i = 0; $i < $num; $i++) 
     246                                for ($i = 0; $i < $num; ++$i) 
    247247                                { 
    248248                                        $types[$expected[$i]['name']] = $expected[$i]['type'];  
     
    342342                                { 
    343343                                        $octets = preg_split('/\./',$string); 
    344                                         for ($i=0; $i != count($octets); $i++) 
     344                                        for ($i=0; $i != count($octets); ++$i) 
    345345                                        { 
    346346                                                if ($octets[$i] < 0 || $octets[$i] > 255) 
     
    408408                                if ($password_length >= $min_length) 
    409409                                { 
    410                                         for ($i=0; $i != $password_length; $i++) 
     410                                        for ($i=0; $i != $password_length; ++$i) 
    411411                                        { 
    412412                                                $cur_test_string = substr($string, $i, 1); 
     
    475475                } 
    476476                $cnt = count($method); 
    477                 for($i=0;$i<$cnt;$i++) 
     477                for($i=0;$i<$cnt;++$i) 
    478478                { 
    479479                        switch(strtoupper($method[$i])) 
     
    730730            $kl=strlen($ky)<32?strlen($ky):32; 
    731731            $k=array(); 
    732             for($i=0;$i<$kl;$i++) 
     732            for($i=0;$i<$kl;++$i) 
    733733                { 
    734734                    $k[$i]=ord($ky{$i})&0x1F; 
    735735                } 
    736736            $j=0; 
    737             for($i=0;$i<strlen($str);$i++) 
     737            for($i=0;$i<strlen($str);++$i) 
    738738                { 
    739739                    $e=ord($str{$i}); 
    740740                    $str{$i}=$e&0xE0?chr($e^$k[$j]):chr($e); 
    741                     $j++;$j=$j==$kl?0:$j; 
     741                    ++$j;$j=$j==$kl?0:$j; 
    742742                } 
    743743            return $str; 
     
    814814                                                $code .= '$p' . $i . ','; 
    815815                                        } 
    816                                         $i++; 
     816                                        ++$i; 
    817817                                } 
    818818                                $code = substr($code,0,-1) . ');'; 
     
    10831083                $less = 0; 
    10841084 
    1085                 for ($i=0;$i<count($testa);$i++) 
     1085                for ($i=0;$i<count($testa);++$i) 
    10861086                { 
    10871087                        if ($DEBUG) { echo'<br>Checking if '. (int)$testa[$i] . ' is less than ' . (int)$testb[$i] . ' ...'; } 
     
    10891089                        { 
    10901090                                if ($DEBUG) { echo ' yes.'; } 
    1091                                 $less++; 
     1091                                ++$less; 
    10921092                                if ($i<3) 
    10931093                                { 
     
    11631163                $less = 0; 
    11641164 
    1165                 for ($i=0;$i<count($testa);$i++) 
     1165                for ($i=0;$i<count($testa);++$i) 
    11661166                { 
    11671167                        if ($DEBUG) { echo'<br>Checking if '. (int)$testa[$i] . ' is more than ' . (int)$testb[$i] . ' ...'; } 
     
    11691169                        { 
    11701170                                if ($DEBUG) { echo ' yes.'; } 
    1171                                 $less++; 
     1171                                ++$less; 
    11721172                                if ($i<3) 
    11731173                                { 
  • trunk/phpgwapi/inc/csstidy/class.csstidy.php

    r5141 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/phpgwapi/inc/csstidy/class.csstidy_optimise.php

    r3052 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/phpgwapi/inc/fpdf/font/courier.php

    r2 r7655  
    11<?php 
    2 for($i=0;$i<=255;$i++) 
     2for($i=0;$i<=255;++$i) 
    33        $fpdf_charwidths['courier'][chr($i)]=600; 
    44$fpdf_charwidths['courierB']=$fpdf_charwidths['courier']; 
  • trunk/phpgwapi/inc/fpdf/font/makefont/makefont.php

    r5928 r7655  
    2424                } 
    2525        } 
    26         for($i=0;$i<=255;$i++) 
     26        for($i=0;$i<=255;++$i) 
    2727                if(!isset($cc2gn[$i])) 
    2828                        $cc2gn[$i]='.notdef'; 
     
    114114                        $widths['Delta']=$widths['increment']; 
    115115                //Order widths according to map 
    116                 for($i=0;$i<=255;$i++) 
     116                for($i=0;$i<=255;++$i) 
    117117                { 
    118118                        if(!isset($widths[$map[$i]])) 
     
    185185        $s="array(\n\t"; 
    186186        $cw=$fm['Widths']; 
    187         for($i=0;$i<=255;$i++) 
     187        for($i=0;$i<=255;++$i) 
    188188        { 
    189189                if(chr($i)=="'") 
     
    211211        $s=''; 
    212212        $last=0; 
    213         for($i=32;$i<=255;$i++) 
     213        for($i=32;$i<=255;++$i) 
    214214        { 
    215215                if($map[$i]!=$ref[$i]) 
     
    257257        //Seek OS/2 table 
    258258        $found=false; 
    259         for($i=0;$i<$nb;$i++) 
     259        for($i=0;$i<$nb;++$i) 
    260260        { 
    261261                if(fread($f,4)=='OS/2') 
  • trunk/phpgwapi/inc/fpdf/fpdf.php

    r2 r7655  
    427427        $w=0; 
    428428        $l=strlen($s); 
    429         for($i=0;$i<$l;$i++) 
     429        for($i=0;$i<$l;++$i) 
    430430                $w+=$cw[$s{$i}]; 
    431431        return $w*$this->FontSize/1000; 
     
    483483                $d=0; 
    484484                $nb=count($this->diffs); 
    485                 for($i=1;$i<=$nb;$i++) 
     485                for($i=1;$i<=$nb;++$i) 
    486486                        if($this->diffs[$i]==$diff) 
    487487                        { 
     
    748748                        } 
    749749                        $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); 
    750                         $i++; 
     750                        ++$i; 
    751751                        $sep=-1; 
    752752                        $j=$i; 
    753753                        $l=0; 
    754754                        $ns=0; 
    755                         $nl++; 
     755                        ++$nl; 
    756756                        if($border and $nl==2) 
    757757                                $b=$b2; 
     
    762762                        $sep=$i; 
    763763                        $ls=$l; 
    764                         $ns++; 
     764                        ++$ns; 
    765765                } 
    766766                $l+=$cw[$c]; 
     
    771771                        { 
    772772                                if($i==$j) 
    773                                         $i++; 
     773                                        ++$i; 
    774774                                if($this->ws>0) 
    775775                                { 
     
    793793                        $l=0; 
    794794                        $ns=0; 
    795                         $nl++; 
     795                        ++$nl; 
    796796                        if($border and $nl==2) 
    797797                                $b=$b2; 
    798798                } 
    799799                else 
    800                         $i++; 
     800                        ++$i; 
    801801        } 
    802802        //Last chunk 
     
    837837                        //Explicit line break 
    838838                        $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); 
    839                         $i++; 
     839                        ++$i; 
    840840                        $sep=-1; 
    841841                        $j=$i; 
     
    847847                                $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; 
    848848                        } 
    849                         $nl++; 
     849                        ++$nl; 
    850850                        continue; 
    851851                } 
     
    865865                                        $w=$this->w-$this->rMargin-$this->x; 
    866866                                        $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; 
    867                                         $i++; 
    868                                         $nl++; 
     867                                        ++$i; 
     868                                        ++$nl; 
    869869                                        continue; 
    870870                                } 
    871871                                if($i==$j) 
    872                                         $i++; 
     872                                        ++$i; 
    873873                                $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); 
    874874                        } 
     
    887887                                $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; 
    888888                        } 
    889                         $nl++; 
     889                        ++$nl; 
    890890                } 
    891891                else 
    892                         $i++; 
     892                        ++$i; 
    893893        } 
    894894        //Last chunk 
     
    10891089        { 
    10901090                //Replace number of pages 
    1091                 for($n=1;$n<=$nb;$n++) 
     1091                for($n=1;$n<=$nb;++$n) 
    10921092                        $this->pages[$n]=str_replace($this->AliasNbPages,$nb,$this->pages[$n]); 
    10931093        } 
     
    11031103        } 
    11041104        $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; 
    1105         for($n=1;$n<=$nb;$n++) 
     1105        for($n=1;$n<=$nb;++$n) 
    11061106        { 
    11071107                //Page 
     
    11451145        $this->_out('<</Type /Pages'); 
    11461146        $kids='/Kids ['; 
    1147         for($i=0;$i<$nb;$i++) 
     1147        for($i=0;$i<$nb;++$i) 
    11481148                $kids.=(3+2*$i).' 0 R '; 
    11491149        $this->_out($kids.']'); 
     
    12301230                        $cw=&$font['cw']; 
    12311231                        $s='['; 
    1232                         for($i=32;$i<=255;$i++) 
     1232                        for($i=32;$i<=255;++$i) 
    12331233                                $s.=$cw[chr($i)].' '; 
    12341234                        $this->_out($s.']'); 
     
    12831283                { 
    12841284                        $trns=''; 
    1285                         for($i=0;$i<count($info['trns']);$i++) 
     1285                        for($i=0;$i<count($info['trns']);++$i) 
    12861286                                $trns.=$info['trns'][$i].' '.$info['trns'][$i].' '; 
    12871287                        $this->_out('/Mask ['.$trns.']'); 
     
    13901390        $this->_out('0 '.($this->n+1)); 
    13911391        $this->_out('0000000000 65535 f '); 
    1392         for($i=1;$i<=$this->n;$i++) 
     1392        for($i=1;$i<=$this->n;++$i) 
    13931393                $this->_out(sprintf('%010d 00000 n ',$this->offsets[$i])); 
    13941394        //Trailer 
  • trunk/phpgwapi/inc/fpdf/tutorial/tuto2.php

    r2 r7655  
    3737$pdf->AddPage(); 
    3838$pdf->SetFont('Times','',12); 
    39 for($i=1;$i<=40;$i++) 
     39for($i=1;$i<=40;++$i) 
    4040        $pdf->Cell(0,10,'Printing line number '.$i,0,1); 
    4141$pdf->Output(); 
  • trunk/phpgwapi/inc/fpdf/tutorial/tuto5.php

    r2 r7655  
    3838        $w=array(40,35,40,45); 
    3939        //Header 
    40         for($i=0;$i<count($header);$i++) 
     40        for($i=0;$i<count($header);++$i) 
    4141                $this->Cell($w[$i],7,$header[$i],1,0,'C'); 
    4242        $this->Ln(); 
     
    6565        //Header 
    6666        $w=array(40,35,40,45); 
    67         for($i=0;$i<count($header);$i++) 
     67        for($i=0;$i<count($header);++$i) 
    6868                $this->Cell($w[$i],7,$header[$i],1,0,'C',1); 
    6969        $this->Ln(); 
  • trunk/phpgwapi/inc/xml_functions.inc.php

    r6057 r7655  
    167167                                } 
    168168                        } 
    169                         $i++; 
     169                        ++$i; 
    170170                } 
    171171                return $op; 
     
    493493                        $arr = array(); 
    494494 
    495                         for($i = 0; $i < $size; $i++) 
     495                        for($i = 0; $i < $size; ++$i) 
    496496                        { 
    497497                                $arr[]=phpgw_xmlrpc_decode($xmlrpc_val->arraymem($i)); 
     
    607607                                $sigs = array(); 
    608608                                $thesigs=$dmap[$methName]['signature']; 
    609                                 for($i=0; $i<sizeof($thesigs); $i++) 
     609                                for($i=0; $i<sizeof($thesigs); ++$i) 
    610610                                { 
    611611                                        $cursig = array(); 
    612612                                        $inSig  = $thesigs[$i]; 
    613                                         for($j=0; $j<sizeof($inSig); $j++) 
     613                                        for($j=0; $j<sizeof($inSig); ++$j) 
    614614                                        { 
    615615                                                $cursig[] = CreateObject('phpgwapi.xmlrpcval',$inSig[$j], 'string'); 
  • trunk/phpgwapi/inc/xmlrpc.interop.php

    r2 r7655  
    139139                $rv = CreateObject('phpgwapi.xmlrpcval',array(), xmlrpcArray); 
    140140 
    141                 for($j=0; $j<$sz; $j++) 
     141                for($j=0; $j<$sz; ++$j) 
    142142                { 
    143143                        $b = $v->arraymem($j); 
     
    208208                        // TODO: create debug method to print can work once more 
    209209                        // print "<!-- found $max array elements -->\n"; 
    210                         for($i=0; $i<$max; $i++) 
     210                        for($i=0; $i<$max; ++$i) 
    211211                        { 
    212212                                $rec = $sno->arraymem($i); 
     
    342342                $sno = $m->getParam(0); 
    343343                $numcurly = 0; 
    344                 for($i=0; $i<$sno->arraysize(); $i++) 
     344                for($i=0; $i<$sno->arraysize(); ++$i) 
    345345                { 
    346346                        $str = $sno->arraymem($i); 
     
    457457                $str=$sno->scalarval(); 
    458458                $gt=0; $lt=0; $ap=0; $qu=0; $amp=0; 
    459                 for($i=0; $i<strlen($str); $i++) 
     459                for($i=0; $i<strlen($str); ++$i) 
    460460                { 
    461461                        $c=substr($str, $i, 1); 
     
    463463                        { 
    464464                                case '>': 
    465                                         $gt++; 
     465                                        ++$gt; 
    466466                                        break; 
    467467                                case '<': 
    468                                         $lt++; 
     468                                        ++$lt; 
    469469                                        break; 
    470470                                case '"': 
    471                                         $qu++; 
     471                                        ++$qu; 
    472472                                        break; 
    473473                                case "'": 
    474                                         $ap++; 
     474                                        ++$ap; 
    475475                                        break; 
    476476                                case '&': 
    477                                         $amp++; 
     477                                        ++$amp; 
    478478                                        break; 
    479479                                default: 
  • trunk/phpgwapi/setup/manageheader.php

    r5913 r7655  
    505505                                ); 
    506506 
    507                                 for($i=0; $i<30; $i++) 
     507                                for($i=0; $i<30; ++$i) 
    508508                                { 
    509509                                        $GLOBALS['phpgw_info']['server']['mcrypt_iv'] .= $random_char[rand(1,count($random_char))]; 
  • trunk/phpgwapi/templates/classic/listUsers.php

    r3404 r7655  
    130130                        $info = ldap_get_entries($ds, $sr); 
    131131                         
    132                         for ($i=0; $i<$info["count"]; $i++) 
     132                        for ($i=0; $i<$info["count"]; ++$i) 
    133133                                { 
    134134                                        if ($info[$i]["phpgwaccountvisible"][0] == '-1') 
     
    144144                $info = ldap_get_entries($ds, $sr); 
    145145                        if($typeAccount == 'u'){  
    146                                 for ($i=0; $i<$info["count"]; $i++) 
     146                                for ($i=0; $i<$info["count"]; ++$i) 
    147147                                { 
    148148                                        if ($info[$i]["phpgwaccountvisible"][0] == '-1') 
     
    152152                        } 
    153153                        else { 
    154                                 for ($i=0; $i<$info["count"]; $i++)      
     154                                for ($i=0; $i<$info["count"]; ++$i) 
    155155                                        $users[$uids=$info[$i]["gidnumber"][0]] = Array('name'  =>      $uids=$info[$i]["cn"][0], 'type'        =>      g);              
    156156                         
  • trunk/phpgwapi/templates/classic/login_classic.php

    r5912 r7655  
    239239                $organizations = $obj_organization->organization_search($GLOBALS['phpgw_info']['server']['ldap_context']); 
    240240                 
    241                 for ($i=0; $i<count($organizations); $i++) 
     241                for ($i=0; $i<count($organizations); ++$i) 
    242242                { 
    243243                        $tmp_array[strtolower($organizations[$i])] = $organizations[$i];         
  • trunk/phpgwapi/templates/classic/navbar.inc.php

    r1705 r7655  
    142142                                        unset($icon); 
    143143                                        unset($title); 
    144                                         $i++;                            
     144                                        ++$i; 
    145145                                } 
    146146                        } 
  • trunk/phpgwapi/templates/default/listUsers.php

    r3404 r7655  
    130130                        $info = ldap_get_entries($ds, $sr); 
    131131                         
    132                         for ($i=0; $i<$info["count"]; $i++) 
     132                        for ($i=0; $i<$info["count"]; ++$i) 
    133133                                { 
    134134                                        if ($info[$i]["phpgwaccountvisible"][0] == '-1') 
     
    144144                $info = ldap_get_entries($ds, $sr); 
    145145                        if($typeAccount == 'u'){  
    146                                 for ($i=0; $i<$info["count"]; $i++) 
     146                                for ($i=0; $i<$info["count"]; ++$i) 
    147147                                { 
    148148                                        if ($info[$i]["phpgwaccountvisible"][0] == '-1') 
     
    152152                        } 
    153153                        else { 
    154                                 for ($i=0; $i<$info["count"]; $i++)      
     154                                for ($i=0; $i<$info["count"]; ++$i) 
    155155                                        $users[$uids=$info[$i]["gidnumber"][0]] = Array('name'  =>      $uids=$info[$i]["cn"][0], 'type'        =>      g);              
    156156                         
  • trunk/phpgwapi/templates/default/login_default.php

    r7109 r7655  
    351351                $organizations = $obj_organization->organization_search($GLOBALS['phpgw_info']['server']['ldap_context']); 
    352352                 
    353                 for ($i=0; $i<count($organizations); $i++) 
     353                for ($i=0; $i<count($organizations); ++$i) 
    354354                { 
    355355                        $tmp_array[strtolower($organizations[$i])] = $organizations[$i];         
     
    546546                // gera parametro com tokens suportados .... 
    547547                $var_tokens = ''; 
    548                 for($ii = 1; $ii < 11; $ii++) 
     548                for($ii = 1; $ii < 11; ++$ii) 
    549549                { 
    550550                        if($GLOBALS['phpgw_info']['server']['test_token' . $ii . '1']) 
  • trunk/phpgwapi/templates/default/navbar.inc.php

    r5486 r7655  
    146146                                        unset($icon); 
    147147                                        unset($title); 
    148                                         $i++;                            
     148                                        ++$i; 
    149149                                } 
    150150                        } 
  • trunk/phpgwapi/templates/news/login_news.php

    r5921 r7655  
    287287                $organizations = $obj_organization->organization_search($GLOBALS['phpgw_info']['server']['ldap_context']); 
    288288                 
    289                 for ($i=0; $i<count($organizations); $i++) 
     289                for ($i=0; $i<count($organizations); ++$i) 
    290290                { 
    291291                        $tmp_array[strtolower($organizations[$i])] = $organizations[$i];         
     
    481481                // gera parametro com tokens suportados .... 
    482482                $var_tokens = ''; 
    483                 for($ii = 1; $ii < 11; $ii++) 
     483                for($ii = 1; $ii < 11; ++$ii) 
    484484                { 
    485485                        if($GLOBALS['phpgw_info']['server']['test_token' . $ii . '1']) 
Note: See TracChangeset for help on using the changeset viewer.