Changeset 7655 for trunk/admin


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/admin/inc
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/inc/Controller.class.php

    r6057 r7655  
    109109                $contents_itens = $this->controller_contentes->getElementsByTagName(self::__CONTROLLER_CONTENTES_ITEM__); 
    110110 
    111                 for ( $i = 0; $i < $contents_itens->length && $contents_itens->item($i)->getAttribute(self::__CONTROLLER_CONTENTES_ITEM_PARAM__) != $section_name; $i++ ); 
     111                for ( $i = 0; $i < $contents_itens->length && $contents_itens->item($i)->getAttribute(self::__CONTROLLER_CONTENTES_ITEM_PARAM__) != $section_name; ++$i ); 
    112112                ( !($i < $contents_itens->length) ) 
    113113                        and die(__CLASS__ . ' [ ERROR #11 ] :: invalid section "' . $section_name . '"'); 
     
    125125 
    126126                if ( empty($alias) && $alias !== '0' ) 
    127                         for ( $i = 0; $i < $section_itens->length && $section_itens->item($i)->getAttribute('ref') != $ref; $i++ ); 
     127                        for ( $i = 0; $i < $section_itens->length && $section_itens->item($i)->getAttribute('ref') != $ref; ++$i ); 
    128128                else 
    129                         for ( $i = 0; $i < $section_itens->length && ( $section_itens->item($i)->getAttribute('ref') != $ref || $section_itens->item($i)->getAttribute('alias') !== $alias); $i++ ); 
     129                        for ( $i = 0; $i < $section_itens->length && ( $section_itens->item($i)->getAttribute('ref') != $ref || $section_itens->item($i)->getAttribute('alias') !== $alias); ++$i ); 
    130130 
    131131                ( !($i < $section_itens->length) ) 
     
    264264        private function _pack($script) 
    265265        { 
    266                 for ( $i = 0; isset($this->_parsers[$i]); $i++ ) 
     266                for ( $i = 0; isset($this->_parsers[$i]); ++$i ) 
    267267                        $script = call_user_func(array(&$this,$this->_parsers[$i]), $script); 
    268268 
  • trunk/admin/inc/class.boaccounts.inc.php

    r2 r7655  
    703703                        { 
    704704                                $error[$totalerrors] = lang('You must enter a lastname'); 
    705                                 $totalerrors++; 
     705                                ++$totalerrors; 
    706706                        } 
    707707 
     
    709709                        { 
    710710                                $error[$totalerrors] = lang('You must enter a loginid'); 
    711                                 $totalerrors++; 
     711                                ++$totalerrors; 
    712712                        } 
    713713                         
     
    715715                        { 
    716716                                $error[$totalerrors] = lang('The groups must include the primary group'); 
    717                                 $totalerrors++; 
     717                                ++$totalerrors; 
    718718                        } 
    719719                         
     
    730730                                          $error[$totalerrors] = lang('That loginid has already been taken'); 
    731731                                   } 
    732                                    $totalerrors++; 
     732                                   ++$totalerrors; 
    733733                                } 
    734734                        } 
     
    739739                                { 
    740740                                        $error[$totalerrors] = lang('The two passwords are not the same'); 
    741                                         $totalerrors++; 
     741                                        ++$totalerrors; 
    742742                                } 
    743743                        } 
     
    746746                        { 
    747747                                $error[$totalerrors] = lang('You must add at least 1 permission or group to this account'); 
    748                                 $totalerrors++; 
     748                                ++$totalerrors; 
    749749                        } 
    750750 
     
    761761                                        { 
    762762                                                $error[$totalerrors] = lang('You have entered an invalid expiration date'); 
    763                                                 $totalerrors++; 
     763                                                ++$totalerrors; 
    764764                                        } 
    765765                                        else 
     
    781781                        { 
    782782                                $error[$totalerrors] = lang ('File space must be an integer'); 
    783                                 $totalerrors++; 
     783                                ++$totalerrors; 
    784784                        } 
    785785                */ 
  • trunk/admin/inc/class.html_tables.inc.php

    r2 r7655  
    102102                        $rparms = array(); 
    103103                        $mrow = $stop; 
    104                         for($rno=0;$rno<$mrow;$rno++) 
     104                        for($rno=0;$rno<$mrow;++$rno) 
    105105                        { 
    106106                                // Build GroupKey 
     
    131131                                $grno = $start; 
    132132                                $gkey = $rows[$start]['#gkey']; 
    133                                 for($rno=$start+1;$rno<$stop;$rno++) 
     133                                for($rno=$start+1;$rno<$stop;++$rno) 
    134134                                { 
    135135                                        $rowspan = 1; 
     
    142142                                                $row = $rows[$rno]; 
    143143 
    144                                                 for($pc=0;$pc<count($row);$pc++) 
     144                                                for($pc=0;$pc<count($row);++$pc) 
    145145                                                { 
    146146                                                        $c = $row[$cols[$pc]]; 
     
    155155                                                        } 
    156156                                                } 
    157                                                 $rno++; 
     157                                                ++$rno; 
    158158                                                $rkey = $rows[$rno]['#gkey']; 
    159159                                        } 
     
    173173                        */ 
    174174                        //print_r($rows); 
    175                         for($rno=$start;$rno<$stop;$rno++) 
     175                        for($rno=$start;$rno<$stop;++$rno) 
    176176                        { 
    177177                                // let user have a hack at the row... 
     
    314314                        $html .= "<table width=\"98%\" bgcolor=\"#000000\">\n"; 
    315315                        $f = array(); 
    316                         for($fno=0;$fno<$noflds;$fno++) 
     316                        for($fno=0;$fno<$noflds;++$fno) 
    317317                        { 
    318318                                $f[]=$fno; 
     
    320320                        // Column Headings 
    321321                        $html .= "\t<tr bgcolor=\"#D3DCFF\">\n"; 
    322                         for($cno=0;$cno<$nocols;$cno++) 
     322                        for($cno=0;$cno<$nocols;++$cno) 
    323323                        { 
    324324                                $html .= "\t\t<td align=\"center\">$cno</td>\n"; 
    325325                        } 
    326326                        $html .= "\t</tr >\n"; 
    327                         for($rno=0;$rno<$norows;$rno++) 
     327                        for($rno=0;$rno<$norows;++$rno) 
    328328                        { 
    329329                                $html .= "\t<tr bgcolor=\"#D3DCFF\">\n"; 
    330                                 for($cno=0;$cno<$nocols;$cno++) 
     330                                for($cno=0;$cno<$nocols;++$cno) 
    331331                                { 
    332332                                        $c = $layout[$rno][$cno]; 
     
    359359                        reset($cols); 
    360360        //              while(list($cno,$name) = each($cols)) 
    361                         for($fno=0;$fno<$noflds;$fno++) 
     361                        for($fno=0;$fno<$noflds;++$fno) 
    362362                        { 
    363363                                $name = $cols[$fno]; 
     
    412412                        $mrows = count($tlayout); 
    413413                        $mcols = count($tlayout[0]); 
    414                         for($pr=0;$pr<$mrows;$pr++) 
    415                         { 
    416                                 for($pc=0;$pc<$mcols;$pc++) 
     414                        for($pr=0;$pr<$mrows;++$pr) 
     415                        { 
     416                                for($pc=0;$pc<$mcols;++$pc) 
    417417                                { 
    418418                                        if(isset($tlayout[$pr][$pc])) 
     
    425425                                                { 
    426426                                                        unset($tlayout[$pr + $rowspan][$pc]); 
    427                                                         $rowspan++; 
     427                                                        ++$rowspan; 
    428428                                                } 
    429429                                                while(($pc + $colspan < $mcols) && ($tlayout[$pr][$pc+$colspan] == $cno)) 
    430430                                                { 
    431431                                                        unset($tlayout[$pr][$pc+$colspan]); 
    432                                                         $colspan++; 
     432                                                        ++$colspan; 
    433433                                                } 
    434434                                                if($colspan > 1 && $rowspan > 1) 
    435435                                                { 
    436                                                         for($r=$pr+1;$r<$pr+$rowspan;$r++) 
     436                                                        for($r=$pr+1;$r<$pr+$rowspan;++$r) 
    437437                                                        { 
    438                                                                 for($c=$pc+1;$c<$pc+$colspan;$c++) 
     438                                                                for($c=$pc+1;$c<$pc+$colspan;++$c) 
    439439                                                                { 
    440440                                                                        unset($tlayout[$r][$c]); 
  • trunk/admin/inc/class.soaccounts.inc.php

    r2 r7655  
    9595                        { 
    9696                                $c_acct_groups = count($userData['account_groups']); 
    97                                 for ($i=0;$i<$c_acct_groups;$i++) 
     97                                for ($i=0;$i<$c_acct_groups;+$i) 
    9898                                { 
    9999                                        $GLOBALS['phpgw']->acl->add_repository('phpgw_group',$userData['account_groups'][$i],$userData['account_id'],1); 
  • trunk/admin/inc/class.solog.inc.php

    r2 r7655  
    4040                                /* fields from phpgw_log table */ 
    4141                                $clist = $this->db->metadata('phpgw_log'); 
    42                                 for ($i=0; $i<count($clist); $i++) 
     42                                for ($i=0; $i<count($clist); ++$i) 
    4343                                { 
    4444                                        $name =  $clist[$i]['name']; 
     
    4848                                /* fields from phpgw_log_msg table */ 
    4949                                $clist = $this->db->metadata('phpgw_log_msg'); 
    50                                 for ($i=0; $i<count($clist); $i++) 
     50                                for ($i=0; $i<count($clist); ++$i) 
    5151                                { 
    5252                                        $name =  $clist[$i]['name']; 
     
    6666                                /* Enhance with Columns for phpgw_accounts */ 
    6767                                $clist = $this->db->metadata('phpgw_accounts'); 
    68                                 for ($i=0; $i<count($clist); $i++) 
     68                                for ($i=0; $i<count($clist); ++$i) 
    6969                                { 
    7070                                        $name =  $clist[$i]['name']; 
  • trunk/admin/inc/class.uiaccounts.inc.php

    r5928 r7655  
    581581                        $c_users = count($users); 
    582582                        $str = ''; 
    583                         for($i=0;$i<$c_users;$i++) 
     583                        for($i=0;$i<$c_users;++$i) 
    584584                        { 
    585585                                $str .= '<option value='.$users[$i]['account_id'].'>'.$GLOBALS['phpgw']->common->display_fullname($users[$i]['account_lid'],$users[$i]['account_firstname'],$users[$i]['account_lastname']).'</option>'."\n"; 
     
    806806                                        $perm_display[$i]['appName'] = $app; 
    807807                                        $perm_display[$i]['title']   = $data['title']; 
    808                                         $i++; 
     808                                        ++$i; 
    809809                                } 
    810810                        } 
     
    816816                        @reset($db_perms); 
    817817 
    818                         for ($i=0;$i<count($perm_display);$i++) 
     818                        for ($i=0;$i<count($perm_display);++$i) 
    819819                        { 
    820820                                if ($perm_display[$i]['title']) 
     
    823823                                } 
    824824 
    825                                 $i++; 
     825                                ++$i; 
    826826 
    827827                                if ($perm_display[$i]['title']) 
     
    955955                         
    956956                        $tr_color = $GLOBALS['phpgw_info']['theme']['row_off']; 
    957                         for ($i=0;$i < count($perm_display);$i++) 
     957                        for ($i=0;$i < count($perm_display);++$i) 
    958958                        { 
    959959                                $app = $perm_display[$i][0]; 
     
    11821182                        { 
    11831183                                $groups_select .= '<option value="' . $value['account_id'] . '"'; 
    1184                                 for ($i=0; $i<count($userGroups); $i++)  
     1184                                for ($i=0; $i<count($userGroups); ++$i) 
    11851185                                { 
    11861186                                        /* print "Los1:".$userData["account_id"].$userGroups[$i]['account_id']." : ".$value['account_id']."<br>"; */ 
  • trunk/admin/inc/class.uiapplications.inc.php

    r2 r7655  
    9797                                        $applications[$app] = $data; 
    9898                                } 
    99                                 $i++; 
     99                                ++$i; 
    100100                        } 
    101101 
  • trunk/admin/inc/class.uiconfig.inc.php

    r6528 r7655  
    407407                                                $newvals = explode(' ',$newval); 
    408408                                                $setting = end($newvals); 
    409                                                 for ($i=0;$i<(count($newvals) - 1); $i++) 
     409                                                for ($i=0;$i<(count($newvals) - 1); ++$i) 
    410410                                                { 
    411411                                                        $configs[] = $newvals[$i]; 
  • trunk/admin/inc/class.uilog.inc.php

    r2 r7655  
    6363                                { 
    6464                                        $c = array(); 
    65                                         for ($i=0;$i<count($_cols);$i++) 
     65                                        for ($i=0;$i<count($_cols);++$i) 
    6666                                        { 
    6767                                                if (!in_array($i, $_delcol)) 
  • trunk/admin/inc/class.uimenuclass.inc.php

    r2 r7655  
    5959                                } 
    6060                                $this->section_item($link,lang($value['description']),$this->rowColor[($i % 2)]); 
    61                                 $i++; 
     61                                ++$i; 
    6262                        } 
    6363 
Note: See TracChangeset for help on using the changeset viewer.