Changeset 7673


Ignore:
Timestamp:
12/18/12 16:15:29 (11 years ago)
Author:
douglasz
Message:

Ticket #3236 - Correcoes para Performance: Function Within Loop Declaration.

Location:
trunk
Files:
102 edited

Legend:

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

    r7655 r7673  
    142142                                                $row = $rows[$rno]; 
    143143 
    144                                                 for($pc=0;$pc<count($row);++$pc) 
     144                        $row_count = count($row); 
     145                                                for($pc=0;$pc<$row_count;++$pc) 
    145146                                                { 
    146147                                                        $c = $row[$cols[$pc]]; 
  • trunk/admin/inc/class.solog.inc.php

    r7655 r7673  
    4040                                /* fields from phpgw_log table */ 
    4141                                $clist = $this->db->metadata('phpgw_log'); 
    42                                 for ($i=0; $i<count($clist); ++$i) 
     42                $clist_count = count($clist); 
     43                                for ($i=0; $i<$clist_count; ++$i) 
    4344                                { 
    4445                                        $name =  $clist[$i]['name']; 
     
    4849                                /* fields from phpgw_log_msg table */ 
    4950                                $clist = $this->db->metadata('phpgw_log_msg'); 
    50                                 for ($i=0; $i<count($clist); ++$i) 
     51                $clist_count = count($clist); 
     52                                for ($i=0; $i<$clist_count; ++$i) 
    5153                                { 
    5254                                        $name =  $clist[$i]['name']; 
     
    6668                                /* Enhance with Columns for phpgw_accounts */ 
    6769                                $clist = $this->db->metadata('phpgw_accounts'); 
    68                                 for ($i=0; $i<count($clist); ++$i) 
     70                $clist_count = count($clist); 
     71                                for ($i=0; $i<$clist_count; ++$i) 
    6972                                { 
    7073                                        $name =  $clist[$i]['name']; 
  • trunk/admin/inc/class.uiaccounts.inc.php

    r7655 r7673  
    816816                        @reset($db_perms); 
    817817 
    818                         for ($i=0;$i<count($perm_display);++$i) 
     818            $perm_display_count = count($perm_display); 
     819                        for ($i=0;$i<$perm_display_count;++$i) 
    819820                        { 
    820821                                if ($perm_display[$i]['title']) 
     
    955956                         
    956957                        $tr_color = $GLOBALS['phpgw_info']['theme']['row_off']; 
    957                         for ($i=0;$i < count($perm_display);++$i) 
     958            $perm_display_count = count($perm_display); 
     959                        for ($i=0;$i < $perm_display_count;++$i) 
    958960                        { 
    959961                                $app = $perm_display[$i][0]; 
     
    11821184                        { 
    11831185                                $groups_select .= '<option value="' . $value['account_id'] . '"'; 
    1184                                 for ($i=0; $i<count($userGroups); ++$i) 
     1186                $userGroups_count = count($userGroups); 
     1187                                for ($i=0; $i<$userGroups_count; ++$i) 
    11851188                                { 
    11861189                                        /* print "Los1:".$userData["account_id"].$userGroups[$i]['account_id']." : ".$value['account_id']."<br>"; */ 
  • trunk/admin/inc/class.uilog.inc.php

    r7655 r7673  
    6363                                { 
    6464                                        $c = array(); 
    65                                         for ($i=0;$i<count($_cols);++$i) 
     65                    $cols_count = count($_cols); 
     66                                        for ($i=0;$i<$cols_count;++$i) 
    6667                                        { 
    6768                                                if (!in_array($i, $_delcol)) 
  • trunk/calendar/inc/class.bocalendar.inc.php

    r7655 r7673  
    12521252                                        $minparts = min($l_participants); 
    12531253                                        $part = Array(); 
    1254                                         for($i=0;$i<count($parts);++$i) 
     1254                    $parts_count = count($parts); 
     1255                                        for($i=0;$i<$parts_count;++$i) 
    12551256                                        { 
    12561257                                                if (($accept_type = substr($parts[$i],-1,1)) == '0' || (int)$accept_type > 0) 
     
    21372138                        { 
    21382139                                $exceptions = explode(',',$exception_str); 
    2139                                 for($exception_count=0;$exception_count<count($exceptions);++$exception_count) 
     2140                $exceptions_count = count($exceptions); 
     2141                                for($exception_count=0;$exception_count<$exceptions_count;++$exception_count) 
    21402142                                { 
    21412143                                        $exception[] = (int)$exceptions[$exception_count]; 
     
    21962198                                } 
    21972199 
    2198                                 for($i=0;$i<count($this->cached_events[$date]);++$i) 
     2200                $cached_events_count = count($this->cached_events[$date]); 
     2201                                for($i=0;$i<$cached_events_count;++$i) 
    21992202                                { 
    22002203                                        if($this->cached_events[$date][$i]['id'] == $event['id'] || $this->cached_events[$date][$i]['reference'] == $event['id']) 
     
    25752578                                        { 
    25762579                                                echo '<!-- Total events found matching '.$search_date.' = '.count($this->cached_events[$search_date]).' -->'."\n"; 
    2577                                                 for($i=0;$i<count($this->cached_events[$search_date]);++$i) 
     2580                        $cached_events_count = count($this->cached_events[$search_date]); 
     2581                                                for($i=0;$i<$cached_events_count;++$i) 
    25782582                                                { 
    25792583                                                        echo '<!-- Date: '.$search_date.' ['.$i.'] = '.$this->cached_events[$search_date][$i]['id'].' -->'."\n"; 
     
    28662870 
    28672871                        //verifica se todos os participantes rejeitaram o evento 
    2868                         for($i = 0; $i < count($sts); ++$i ){ 
     2872            $sts_count = count($sts); 
     2873                        for($i = 0; $i < $sts_count; ++$i ){ 
    28692874                                if( $sts[i] === "R") 
    28702875                                        unset( $sts[i] ); 
     
    44364441                        { 
    44374442                                $cal_grps = ''; 
    4438                                 for($i=0;$i<count($event['groups']);++$i) 
     4443                $event_groups_count = count($event['groups']); 
     4444                                for($i=0;$i<$event_groups_count;++$i) 
    44394445                                { 
    44404446                                        if($GLOBALS['phpgw']->accounts->exists($event['groups'][$i])) 
  • trunk/calendar/inc/class.boholiday.inc.php

    r7655 r7673  
    364364                { 
    365365                        $new_holidays = Array(); 
    366                         for($i=0;$i<count($holidays);++$i) 
     366            $holidays_count = count($holidays); 
     367                        for($i=0;$i<$holidays_count;++$i) 
    367368                        { 
    368369//      echo "Setting Holidays Date : ".date('Ymd',$holidays[$i]['date'])."<br>\n"; 
     
    386387 
    387388                        $temp_locale = $GLOBALS['phpgw_info']['user']['preferences']['common']['country']; 
    388                         for($i=0;$i<count($holidays);++$i) 
     389            $holidays_count = count($holidays); 
     390                        for($i=0;$i<$holidays_count;++$i) 
    389391                        { 
    390392                                $c = $i; 
  • trunk/calendar/inc/class.boicalendar.inc.php

    r7655 r7673  
    14341434                        //$this->debug('parse_parameters array return_value: '._debug_array($return_value,False)); 
    14351435 
    1436                 for ($i = 0; $i < count($return_value); ++$i) { 
     1436        $return_value_count = count($return_value); 
     1437                for ($i = 0; $i < $return_value_count; ++$i) { 
    14371438                                $name = strtolower($return_value[$i]['param']); 
    14381439                                $value = $this->strip_quotes($return_value[$i]['value']); 
     
    16611662                                        if (!empty ($event[$value])) { 
    16621663                                                if ($multiples && $value != 'exdate') { 
    1663                                                         for ($i = 0; $i < count($event[$value]); ++$i) { 
     1664                            $event_value_count = count($event[$value]); 
     1665                                                        for ($i = 0; $i < $event_value_count; ++$i) { 
    16641666                                                                $str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . $this->build_parameters($event[$value][$i], $value)); 
    16651667                                                                } 
     
    16741676                                case 'uri' : 
    16751677                                        if (!empty ($event[$value])) { 
    1676                                                 for ($i = 0; $i < count($event[$value]); ++$i) { 
     1678                        $event_value_count = count($event[$value]); 
     1679                                                for ($i = 0; $i < $event_value_count; ++$i) { 
    16771680                                                        $str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . $this->build_parameters($event[$value][$i], $to_text)); 
    16781681                                                        } 
     
    16821685                                        if (!empty ($event[$value])) { 
    16831686                                                if ($multiples) { 
    1684                                                         for ($i = 0; $i < count($event[$value]); ++$i) { 
     1687                            $event_value_count = count($event[$value]); 
     1688                                                        for ($i = 0; $i < $event_value_count; ++$i) { 
    16851689                                                                $str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . $this->build_parameters($event[$value][$i], $value)); 
    16861690                                                        } 
     
    17121716                                                if (@ $this->parameter[$key]['type'] != 'function') { 
    17131717                                                        if ($multiples && count($event[$value]) > 1) { 
    1714                                                                 for ($i = 0; $i < count($event[$value]); ++$i) { 
     1718                                $event_value_count = count($event[$value]); 
     1719                                                                for ($i = 0; $i < $event_value_count; ++$i) { 
    17151720                                                                        $str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . $this->build_parameters($event[$value][$i], $value)); 
    17161721                                                                } 
     
    17211726                                                                $function = $this->parameter[$value]['function']; 
    17221727                                                        if ($multiples) { 
    1723                                                                 for ($i = 0; $i < count($event[$value]); ++$i) { 
     1728                                $event_value_count = count($event[$value]); 
     1729                                                                for ($i = 0; $i < $event_value_count; ++$i) { 
    17241730                                                                        $str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . ':' . $this-> $function ($event[$value][$i])); 
    17251731                                                                } 
     
    17321738                                case 'cal-address' : 
    17331739                                        if (is_array($event[$value][0])) { 
    1734                                                 for ($j = 0; $j < count($event[$value]); ++$j) { 
     1740                        $event_value_count = count($event[$value]); 
     1741                                                for ($j = 0; $j < $event_value_count; ++$j) { 
    17351742                                                        $temp_output = $this->build_parameters($event[$value][$j], $value); 
    17361743                                                        if ($temp_output) { 
     
    17481755                        } 
    17491756                if (!empty ($event['x_type'])) { 
    1750                         for ($i = 0; $i < count($event['x_type']); ++$i) { 
     1757            $event_x_type_count = count($event['x_type']); 
     1758                        for ($i = 0; $i < $event_x_type_count; ++$i) { 
    17511759                                $str .= $this->build_xtype($event['x_type'][$i], ':'); 
    17521760                                } 
     
    17551763                if ($ical_item == 'vtimezone') { 
    17561764                        if ($event['tzdata']) { 
    1757                                 for ($k = 0; $k < count($event['tzdata']); ++$k) { 
     1765                $event_tzdata_count = count($event['tzdata']); 
     1766                                for ($k = 0; $k < $event_tzdata_count; ++$k) { 
    17581767                                        $str .= 'BEGIN:' . strtoupper($event['tzdata'][$k]['type']) . "\r\n"; 
    17591768                                        $str .= $this->build_card_internals(strtolower($event['tzdata'][$k]['type']), $event['tzdata'][$k]); 
     
    17631772                        } 
    17641773                elseif ($event['alarm']) { 
    1765                         for ($k = 0; $k < count($event['alarm']); ++$k) { 
     1774            $event_alarm_count = count($event['alarm']); 
     1775                        for ($k = 0; $k < $event_alarm_count; ++$k) { 
    17661776                                $str .= 'BEGIN:VALARM' . "\r\n"; 
    17671777                                $str .= $this->build_card_internals('valarm', $event['alarm'][$k]); 
  • trunk/calendar/inc/class.socalendar.inc.php

    r7655 r7673  
    179179                        $events = $this->list_events($startYear,$startMonth,$startDay,$endYear,$endMonth,$endDay); 
    180180                        $events_cached = Array(); 
    181                         for($i=0;$i<count($events);++$i) 
     181            $events_count = count($events); 
     182                        for($i=0;$i<$events_count;++$i) 
    182183                        { 
    183184                                $events_cached[] = $this->read_entry($events[$i]); 
  • trunk/calendar/inc/class.socalendar_sql.inc.php

    r7655 r7673  
    597597                                { 
    598598                                        $groups = explode(',',$this->stream->f('groups')); 
    599                                         for($j=1;$j<count($groups) - 1;++$j) 
     599                    $groups_count = count($groups) - 1; 
     600                                        for($j=1;$j<$groups_count;++$j) 
    600601                                        { 
    601602                                                $this->add_attribute('groups',$groups[$j],$j-1); 
  • trunk/calendar/inc/class.uicalendar.inc.php

    r7655 r7673  
    328328                                        ); 
    329329                                } 
    330                                 for($l=0;$l<count($var);++$l) 
     330                $var_count = count($var); 
     331                                for($l=0;$l<$var_count;++$l) 
    331332                                { 
    332333                                        $this->output_template_array($mini_cal_tpl,'monthweek_day','mini_day',$var[$l]); 
     
    13311332                        $str = ''; 
    13321333 
    1333                         for($i=0;$i<count($event['recur_exception']);++$i) 
     1334            $event_count = count($event['recur_exception']); 
     1335                        for($i=0;$i<$event_count;++$i) 
    13341336                        { 
    13351337                                $str .= '    <option value="'.$i.'">'.$GLOBALS['phpgw']->common->show_date($event['recur_exception'][$i]).'</option>'."\n"; 
     
    14571459                                // Add participants 
    14581460                                $participants = explode(";", $GLOBALS['phpgw']->session->appsession("participants") ); 
    1459                                 for($_f_part=0; $_f_part<count($participants); ++$_f_part) 
     1461                $participants_count = count($participants); 
     1462                                for($_f_part=0; $_f_part<$participants_count; ++$_f_part) 
    14601463                                { 
    14611464                                        $this->bo->add_attribute('participants','A',$participants[$_f_part]); 
     
    28092812                        $accounts = $GLOBALS['phpgw']->acl->get_ids_for_location('run',1,'calendar'); 
    28102813                        $users = Array(); 
    2811                         for($i=0;$i<count($accounts);++$i) 
     2814            $accounts_count = count($accounts); 
     2815                        for($i=0;$i<$accounts_count;++$i) 
    28122816                        { 
    28132817                                $user = $accounts[$i]; 
     
    28202824                                                if($group_members != False) 
    28212825                                                { 
    2822                                                         for($j=0;$j<count($group_members);++$j) 
     2826                            $group_members_count = count($group_members); 
     2827                                                        for($j=0;$j<$group_members_count;++$j) 
    28232828                                                        { 
    28242829                                                                if(!isset($users[$group_members[$j]])) 
     
    28612866                        ); 
    28622867 
    2863                         for($i=0;$i<count($var);++$i) 
     2868            $var_count = count($var); 
     2869                        for($i=0;$i<$var_count;++$i) 
    28642870                        { 
    28652871                                $this->output_template_array($p,'rows','list',$var[$i]); 
     
    36073613 
    36083614                        $description = $this->bo->get_short_field($event,$is_private,'description'); 
    3609                         for($i=0;$i<count($picture);++$i) 
     3615            $picture_count = count($picture); 
     3616                        for($i=0;$i<$picture_count;++$i) 
    36103617                        { 
    36113618                                $var = Array( 
     
    37973804 
    37983805                        $description = $this->bo->get_short_field($event,$is_private,'description'); 
    3799                         for($i=0;$i<count($picture);++$i) 
     3806            $picture_count = count($picture); 
     3807                        for($i=0;$i<$picture_count;++$i) 
    38003808                        { 
    38013809                                $var = Array( 
     
    38683876 
    38693877                        $overlap = ''; 
    3870                         for($i=0;$i<count($overlapping_events);++$i) 
     3878            $overlapping_events_count = count($overlapping_events); 
     3879                        for($i=0;$i<$overlapping_events_count;++$i) 
    38713880                        { 
    38723881                                $overlapped_event = $this->bo->read_entry($overlapping_events[$i],True); 
     
    57345743                        } 
    57355744 
    5736                         for ($i=0; $i<count($control_data['part']); ++$i) 
     5745            $control_data_count = count($control_data['part']); 
     5746                        for ($i=0; $i<$control_data_count; ++$i) 
    57375747                        { 
    57385748                                $id = $control_data['part'][$i]; 
     
    57455755                        if ($control_data['action'] == lang('Delete selected contacts')) 
    57465756                        { 
    5747                                 for ($i=0; $i<count($control_data['delete']); ++$i) 
     5757                $control_data_count = count($control_data['delete']); 
     5758                                for ($i=0; $i<$control_data_count; ++$i) 
    57485759                                { 
    57495760                                        $id = $control_data['delete'][$i]; 
     
    59705981                                if($holidays) 
    59715982                                { 
    5972                                         for($k=0;$k<count($holidays);++$k) 
     5983                    $holidays_count = count($holidays); 
     5984                                        for($k=0;$k<$holidays_count;++$k) 
    59735985                                        { 
    59745986                                                $holiday_name[] = $holidays[$k]['name']; 
  • trunk/calendar/inc/class.uipublicview.inc.php

    r7655 r7673  
    521521 
    522522                        $description = $this->bo->get_short_field($event,$is_private,'description'); 
    523                         for($i=0;$i<count($picture);++$i) 
     523            $picture_count = count($picture); 
     524                        for($i=0;$i<$picture_count;++$i) 
    524525                        { 
    525526                                $var = Array( 
     
    946947                                if($holidays) 
    947948                                { 
    948                                         for($k=0;$k<count($holidays);++$k) 
     949                    $holidays_count = count($holidays); 
     950                                        for($k=0;$k<$holidays_count;++$k) 
    949951                                        { 
    950952                                                $holiday_name[] = $holidays[$k]['name']; 
  • trunk/calendar/templates/default/header.inc.php

    r7655 r7673  
    105105                if(isset($GLOBALS['HTTP_POST_VARS']['participants']) && $GLOBALS['HTTP_POST_VARS']['participants']) 
    106106                { 
    107                         for ($i=0;$i<count($GLOBALS['HTTP_POST_VARS']['participants']);++$i) 
     107            $globals_count = count($GLOBALS['HTTP_POST_VARS']['participants']); 
     108                        for ($i=0;$i<$globals_count;++$i) 
    108109                        { 
    109110                                $base_hidden_vars .= '    <input type="hidden" name="participants[]" value="'.$GLOBALS['HTTP_POST_VARS']['participants'][$i].'">'."\n"; 
  • trunk/contactcenter/inc/class.bo_ldap_manager.inc.php

    r7655 r7673  
    438438                        $referral = $this -> get_ldap_referrals($ds, $dn, $filter); 
    439439                        $sub_branches = array(); 
    440                          
    441                         for($i = 0; $i <count($referral); ++$i) { 
     440 
     441            $referral_count = count($referral); 
     442                        for($i = 0; $i <$referral_count; ++$i) { 
    442443                                $dn = str_replace("??base","",preg_replace('!^(ldap://[^/]+)/(.*$)!', '\\2', $referral[$i])); 
    443444                                $dn = explode(",",$dn);                          
  • trunk/contactcenter/inc/class.ui_data.inc.php

    r7655 r7673  
    21182118 
    21192119                        $actualCatalog = $this->get_actual_catalog(); 
    2120                         for ($i = 0; $i < count($data['contact_in_list']); ++$i) 
     2120                        $data_count = count($data['contact_in_list']); 
     2121                        for ($i = 0; $i < $data_count; ++$i) 
    21212122                        { 
    21222123                            if (preg_match('/ldap:.*:.*/', $data['contact_in_list'][$i])) // from ldap 
     
    37893790                        $contact['names_ordered'] = $info[0]['description']; 
    37903791                        $filter = ""; 
    3791                         for($z = 0; $z < count($member_uids); ++$z) { 
     3792            $member_uids_count = count($member_uids); 
     3793                        for($z = 0; $z < $member_uids_count; ++$z) { 
    37923794                                if($member_uids[$z]) 
    37933795                                        $filter.="(uid=".$member_uids[$z].")"; 
     
    48064808                        if ($info) 
    48074809                        { 
    4808                                 for ($i = 0; $i < count($justThese); ++$i) 
     4810                $justThese_count = count($justThese); 
     4811                                for ($i = 0; $i < $justThese_count; ++$i) 
    48094812                                { 
    48104813                                        $attr = array(); 
  • trunk/emailadmin/inc/class.ui.inc.php

    r7655 r7673  
    240240                        if ($profileList) 
    241241                        { 
    242                                 for ($i=0; $i < count($profileList); ++$i) 
     242                $profileList_count = count($profileList); 
     243                                for ($i=0; $i < $profileList_count; ++$i) 
    243244                                { 
    244245                                        $linkData = array 
  • trunk/emailadmin/inc/class.uiuserdata.inc.php

    r7655 r7673  
    7878                                { 
    7979                                        $options_mailAlternateAddress = "<select size=\"6\" name=\"mailAlternateAddress\">\n"; 
    80                                         for ($i=0;$i < count($userData['mailAlternateAddress']); ++$i) 
     80                    $userData_count = count($userData['mailAlternateAddress']); 
     81                                        for ($i=0;$i < $userData_count; ++$i) 
    8182                                        { 
    8283                                                $options_mailAlternateAddress .= "<option value=\"$i\">". 
     
    9495                                { 
    9596                                        $options_mailRoutingAddress = "<select size=\"6\" name=\"mailRoutingAddress\">\n"; 
    96                                         for ($i=0;$i < count($userData['mailRoutingAddress']); ++$i) 
     97                    $userData_count = count($userData['mailRoutingAddress']); 
     98                                        for ($i=0;$i < $userData_count; ++$i) 
    9799                                        { 
    98100                                                $options_mailRoutingAddress .= "<option value=\"$i\">". 
  • trunk/expressoAdmin1_2/inc/class.bomessages_size.inc.php

    r7655 r7673  
    285285                        $rules_tr = ''; 
    286286 
    287                         for ($i = 0; $i<count($rules); ++$i) 
     287            $rules_count = count($rules); 
     288                        for ($i = 0; $i<$rules_count; ++$i) 
    288289                        { 
    289290                                $name_link = (string)str_replace(" ", "%", $rules[$i]['email_recipient']); 
     
    311312                        $rules_tr = ''; 
    312313 
    313                         for ($i = 0; $i<count($rules); ++$i) 
     314            $rules_count = count($rules); 
     315                        for ($i = 0; $i<$rules_count; ++$i) 
    314316                        { 
    315317                                $name_link = (string)str_replace(" ", "%", $rules[$i]['email_recipient']); 
  • trunk/expressoAdmin1_2/inc/class.bosectors.inc.php

    r7655 r7673  
    162162                        $sector_users = $this->so->get_sector_users($sector_dn); 
    163163 
    164                         for ($i=0; $i<count($sector_users)-1; ++$i) 
     164            $sector_users_count = count($sector_users)-1; 
     165                        for ($i=0; $i<$sector_users_count; ++$i) 
    165166                        { 
    166167                                //_debug_array($user); 
     
    174175 
    175176                        $sector_groups = $this->so->get_sector_groups($sector_dn); 
    176                         for ($i=0; $i<count($sector_groups)-1; ++$i) 
     177            $sector_groups_count = count($sector_groups)-1; 
     178                        for ($i=0; $i<$sector_groups_count; ++$i) 
    177179                        { 
    178180                                $dn = $sector_groups[$i]['dn']; 
  • trunk/expressoAdmin1_2/inc/class.db_functions.inc.php

    r7655 r7673  
    141141                 
    142142                //Escrevre no Banco as aplicações que o gerente tem direito de disponibilizar aos seus usuarios. 
    143                 for ($i=0; $i<count($aplications); ++$i) 
     143        $aplications_count = count($aplications); 
     144                for ($i=0; $i<$aplications_count; ++$i) 
    144145                { 
    145146                        $sql = "INSERT INTO phpgw_expressoadmin_apps (manager_lid, context, app) " 
     
    415416                while($this->db->next_record()) 
    416417                        $user_app[] = $this->db->row(); 
    417                  
    418                 for ($i=0; $i<count($user_app); ++$i) 
     418 
     419        $user_app_count = count($user_app); 
     420                for ($i=0; $i<$user_app_count; ++$i) 
    419421                        $return['groups'][] = $user_app[$i]['acl_location']; 
    420422                 
  • trunk/expressoAdmin1_2/inc/class.ldap_functions.inc.php

    r7655 r7673  
    15711571                                $entry[0]['dn'] = strtolower($entry[0]['dn']); 
    15721572                                $sector_dn_array = explode(",", $entry[0]['dn']); 
    1573                                 for($i=1; $i<count($sector_dn_array); ++$i) 
     1573                $sector_dn_array_count = count($sector_dn_array); 
     1574                                for($i=1; $i<$sector_dn_array_count; ++$i) 
    15741575                                        $sector_dn .= $sector_dn_array[$i] . ','; 
    15751576                                //Retira ultimo pipe. 
     
    16981699                                $entry[0]['dn'] = strtolower($entry[0]['dn']); 
    16991700                                $sector_dn_array = explode(",", $entry[0]['dn']); 
    1700                                 for($i=1; $i<count($sector_dn_array); ++$i) 
     1701                $sector_dn_array_count = count($sector_dn_array); 
     1702                                for($i=1; $i<$sector_dn_array_count; ++$i) 
    17011703                                        $sector_dn .= $sector_dn_array[$i] . ','; 
    17021704                                //Retira ultimo pipe. 
     
    18311833                                $entry[0]['dn'] = strtolower($entry[0]['dn']); 
    18321834                                $sector_dn_array = explode(",", $entry[0]['dn']); 
    1833                                 for($i=1; $i<count($sector_dn_array); ++$i) 
     1835                $sector_dn_array_count = count($sector_dn_array); 
     1836                                for($i=1; $i<$sector_dn_array_count; ++$i) 
    18341837                                        $sector_dn .= $sector_dn_array[$i] . ','; 
    18351838                                //Retira ultimo pipe. 
     
    19291932                                $entry[0]['dn'] = strtolower($entry[0]['dn']); 
    19301933                                $sector_dn_array = explode(",", $entry[0]['dn']); 
    1931                                 for($i=1; $i<count($sector_dn_array); ++$i) 
     1934                $sector_dn_array_count = count($sector_dn_array); 
     1935                                for($i=1; $i<$sector_dn_array_count; ++$i) 
    19321936                                        $sector_dn .= $sector_dn_array[$i] . ','; 
    19331937                                //Retira ultimo pipe. 
     
    20012005                                $entry[0]['dn'] = strtolower($entry[0]['dn']); 
    20022006                                $sector_dn_array = explode(",", $entry[0]['dn']); 
    2003                                 for($i=1; $i<count($sector_dn_array); ++$i) 
     2007                $sector_dn_array_count = count($sector_dn_array); 
     2008                                for($i=1; $i<$sector_dn_array_count; ++$i) 
    20042009                                        $sector_dn .= $sector_dn_array[$i] . ','; 
    20052010                                //Retira ultimo pipe. 
  • trunk/expressoAdmin1_2/inc/class.socomputers.inc.php

    r7655 r7673  
    8686                                        // Recupera o contexto do email_list 
    8787                                        $tmp = explode(",", $computer_data['dn']); 
    88                                         for ($i = 1; $i < count($tmp); ++$i) 
     88                    $tmp_count = count($tmp); 
     89                                        for ($i = 1; $i < $tmp_count; ++$i) 
    8990                                                $computer_data['context'] .= $tmp[$i] . ','; 
    9091                                        $computer_data['context'] = substr($computer_data['context'],0,(strlen($computer_data['context']) - 1)); 
  • trunk/expressoAdmin1_2/inc/class.uimessages_size.inc.php

    r7655 r7673  
    114114                        $rules = ''; 
    115115            $all_rules = $this->bo->get_all_rules(); 
    116                          
    117                         for ($i = 0; $i<count($all_rules); ++$i) 
     116 
     117            $all_rules_count = count($all_rules); 
     118                        for ($i = 0; $i<$all_rules_count; ++$i) 
    118119                        {        
    119120                                /* Verificação para não listar a regra default */ 
  • trunk/expressoMail1_2/inc/class.db_functions.inc.php

    r7655 r7673  
    181181 
    182182        function getAddrs($array_addrs) { 
    183                 $array_addrs_final = array();                            
    184  
    185                 for($i = 0; $i < count($array_addrs); ++$i){ 
     183                $array_addrs_final = array(); 
     184 
     185        $array_addrs_count = count($array_addrs); 
     186                for($i = 0; $i < $array_addrs_count; ++$i){ 
    186187                        $j = count($array_addrs_final); 
    187188 
  • trunk/expressoMail1_2/inc/class.exporteml.inc.php

    r7655 r7673  
    123123                    if (is_array($files)) 
    124124                    { 
    125                         for ($i=0; $i < count($files); ++$i) 
     125                        $files_count = count($files); 
     126                        for ($i=0; $i < $files_count; ++$i) 
    126127                        { 
    127128                            $files[$i] = escapeshellarg($files[$i]); 
     
    315316                         
    316317                        //cria um .zip com as mensagens selecionadas 
    317                         for($i = 0; $i < count($msg_number); ++$i) 
     318            $msg_number_count = count($msg_number); 
     319                        for($i = 0; $i < $msg_number_count; ++$i) 
    318320                        { 
    319321                                $header         = $this-> getHeader($msg_number[$i]);                                                                                    
     
    353355                }else{ 
    354356                        $array_names_keys = array_keys($sorted_msgs); 
    355                          
    356                         for($i = 0; $i < count($array_names_keys); ++$i){ 
     357 
     358            $array_names_keys_count = count($array_names_keys); 
     359                        for($i = 0; $i < $array_names_keys_count; ++$i){ 
    357360                                $this->folder = mb_convert_encoding($array_names_keys[$i], "UTF7-IMAP","UTF-8, ISO-8859-1, UTF7-IMAP"); 
    358361                                $msg_number = explode(',', $sorted_msgs[$array_names_keys[$i]]); 
    359362                                $tempDir = $this->tempDir; 
    360363                                $this->connectImap(); 
    361                                  
    362                                 for($j = 0; $j < count($msg_number); ++$j) 
     364 
     365                $msg_number_count = count($msg_number); 
     366                                for($j = 0; $j < $msg_number_count; ++$j) 
    363367                                { 
    364368                                        $header         = $this-> getHeader($msg_number[$j]);                                                                                    
     
    474478                        } 
    475479 
    476                         for($i = 0; $i < count($array_ids); ++$i) 
     480            $array_ids_count = count($array_ids); 
     481                        for($i = 0; $i < $array_ids_count; ++$i) 
    477482                        { 
    478483                                $header         = $this-> getHeader($array_ids[$i]);                                                                                    
     
    796801                 
    797802                $fileNames = Array(); 
    798                          
    799                 for ($i = 0; $i < count($attachments); ++$i) 
     803                $attachments_count = count($attachments); 
     804                for ($i = 0; $i < $attachments_count; ++$i) 
    800805                { 
    801806                   $attachments[$i]['name'] = $this->remove_accents($attachments[$i]['name']); 
     
    803808                } 
    804809 
    805                 for ($i = 0; $i < count($attachments); ++$i) 
     810                $attachments_count = count($attachments); 
     811                for ($i = 0; $i < $attachments_count; ++$i) 
    806812                { 
    807813                        $fileName = $attachments[$i]['name']; 
     
    811817                        if (count($result) > 1) 
    812818                        { 
    813                             for ($j = 1; $j < count($result); ++$j) 
     819                            $result_count = count($result); 
     820                            for ($j = 1; $j < $result_count; ++$j) 
    814821                            { 
    815822                                $replacement = '('.$j.')$0'; 
  • trunk/expressoMail1_2/inc/class.functions.inc.php

    r7655 r7673  
    126126                                $includeFiles[0] = null; 
    127127                                // End Bug fixed. 
    128                         }                                                                                                                
    129                         for($i = 0; $i < count($files); ++$i) { 
     128                        } 
     129            $files_count = count($files); 
     130                        for($i = 0; $i < $files_count; ++$i) { 
    130131                                if(count(explode('.js',$files[$i])) > 1) { 
    131132                                        if($includeFiles  && array_search(trim($files[$i]),$includeFiles)){      
  • trunk/expressoMail1_2/inc/class.imap_functions.inc.php

    r7655 r7673  
    245245                                                                array('filter' => $filter, 'criteria' => array('deepness' => '2')) 
    246246                                                        ); 
    247                                                         for($i=0; $i<count($sort_array_msg); ++$i){ 
     247                            $sort_array_msg_count = count($sort_array_msg); 
     248                                                        for($i=0; $i<$sort_array_msg_count; ++$i){ 
    248249                                                                if(!isset($return[$i]['msg_number'])) 
    249250                                                                        continue; 
     
    518519                        $elements = imap_mime_header_decode($string); 
    519520 
    520                         for($i = 0;$i < count($elements);++$i) 
     521            $elements_count = count($elements); 
     522                        for($i = 0;$i < $elements_count;++$i) 
    521523                        { 
    522524                                $charset = strtolower($elements[$i]->charset); 
     
    785787                        $return = array(); 
    786788                        $array_names_keys = array_keys($sorted_msgs); 
    787                          
    788                         for($i = 0; $i < count($sorted_msgs); ++$i){ 
     789 
     790            $sorted_msgs_count = count($sorted_msgs); 
     791                        for($i = 0; $i < $sorted_msgs_count; ++$i){ 
    789792                         
    790793                                $new_params = array(); 
     
    25592562                }else{ 
    25602563                        $child = $base_path.$this->imap_delimiter; 
    2561                         for($i =0; $i < count($test); ++$i){ 
     2564            $test_count = count($test); 
     2565                        for($i =0; $i < $test_count; ++$i){ 
    25622566                                $child .= ($test[$i] ? $test[$i] : $this->functions->getLang("New Folder")); 
    25632567                                $namebox =  mb_convert_encoding($child, "UTF7-IMAP", "UTF-8"); 
     
    36543658                        return $returns; 
    36553659                }else{ 
    3656                         for($i = 0; $i < count($array_names_keys); ++$i){ 
     3660            $array_names_keys_count = count($array_names_keys); 
     3661                        for($i = 0; $i < $array_names_keys_count; ++$i){ 
    36573662                                $param['folder'] = $array_names_keys[$i]; 
    36583663                                $param['msgs_to_set'] = $sorted_msgs[$array_names_keys[$i]]; 
  • trunk/expressoMail1_2/inc/class.message_components.inc.php

    r7655 r7673  
    107107                } 
    108108 
    109                 for($p = 0, $i = 1; $p < count($parts); ++$n, ++$p, ++$i) 
     109                $parts_count = count($parts); 
     110                for($p = 0, $i = 1; $p < $parts_count; ++$n, ++$p, ++$i) 
    110111                { 
    111112                    // Skip the following... 
  • trunk/expressoMail1_2/inc/class.phpmailer.php

    r7655 r7673  
    472472    function MailSend($header, $body) { 
    473473        $to = ""; 
    474         for($i = 0; $i < count($this->to); ++$i) 
     474        $to_count = count($this->to); 
     475        for($i = 0; $i < $to_count; ++$i) 
    475476        { 
    476477            if($i != 0) { $to .= ", "; } 
     
    533534 
    534535        // Attempt to send attach all recipients 
    535         for($i = 0; $i < count($this->to); ++$i) 
     536        $to_count = count($this->to); 
     537        for($i = 0; $i < $to_count; ++$i) 
    536538        { 
    537539                if(!$this->smtp->Recipient($this->to[$i][0])) 
    538540                        $bad_rcpt[] = $this->to[$i][0]; 
    539541        } 
    540         for($i = 0; $i < count($this->cc); ++$i) 
     542        $cc_count = count($this->cc); 
     543        for($i = 0; $i < $cc_count; ++$i) 
    541544        { 
    542545                if(!$this->smtp->Recipient($this->cc[$i][0])) 
    543546                        $bad_rcpt[] = $this->cc[$i][0]; 
    544547        } 
    545         for($i = 0; $i < count($this->bcc); ++$i) 
     548        $bcc_count = count($this->bcc); 
     549        for($i = 0; $i < $bcc_count; ++$i) 
    546550        { 
    547551                if(!$this->smtp->Recipient($this->bcc[$i][0])) 
     
    563567            //Postfix version 2.1.5-9 
    564568            $array_error = explode(":", $this->smtp->error['smtp_msg']); 
    565              
    566             for($i = 0; $i < count($bad_rcpt); ++$i) 
     569 
     570            $bad_rcpt_count = count($bad_rcpt); 
     571            for($i = 0; $i < $bad_rcpt_count; ++$i) 
    567572            { 
    568573                if($i != 0) { $error .= ", "; } 
     
    826831        if(count($addr) > 1) 
    827832        { 
    828             for($i = 1; $i < count($addr); ++$i) 
     833            $addr_count = count($addr); 
     834            for($i = 1; $i < $addr_count; ++$i) 
    829835                $addr_str .= ", " . $this->AddrFormat($addr[$i]); 
    830836        } 
     
    867873        $line = explode($this->LE, $message); 
    868874        $message = ""; 
    869         for ($i=0 ;$i < count($line); ++$i) 
     875        $line_count = count($line); 
     876        for ($i=0 ;$i < $line_count; ++$i) 
    870877        { 
    871878          $line_part = explode(" ", $line[$i]); 
    872879          $buf = ""; 
    873           for ($e = 0; $e<count($line_part); $e++) 
     880          $line_part_count = count($line_part); 
     881          for ($e = 0; $e<$line_part_count; $e++) 
    874882          { 
    875883              $word = $line_part[$e]; 
     
    10311039 
    10321040        // Add custom headers 
    1033         for($index = 0; $index < count($this->CustomHeader); ++$index) 
     1041        $CustomHeader_count = count($this->CustomHeader); 
     1042        for($index = 0; $index < $CustomHeader_count; ++$index) 
    10341043        { 
    10351044            $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]),  
     
    12651274 
    12661275        // Add all attachments 
    1267         for($i = 0; $i < count($this->attachment); ++$i) 
     1276        $attachment_count = count($this->attachment); 
     1277        for($i = 0; $i < $attachment_count; ++$i) 
    12681278        { 
    12691279            // Check for string attachment 
     
    15401550    function InlineImageExists() { 
    15411551        $result = false; 
    1542         for($i = 0; $i < count($this->attachment); ++$i) 
     1552        $attachment_count = count($this->attachment); 
     1553        for($i = 0; $i < $attachment_count; ++$i) 
    15431554        { 
    15441555            if($this->attachment[$i][6] == "inline") 
  • trunk/expressoMail1_2/login_offline.php

    r7655 r7673  
    195195                $obj_organization = CreateObject('phpgwapi.sector_search_ldap'); 
    196196                $organizations = $obj_organization->organization_search($GLOBALS['phpgw_info']['server']['ldap_context']); 
    197                  
    198                 for ($i=0; $i<count($organizations); ++$i) 
     197 
     198        $organizations_count = count($organizations); 
     199                for ($i=0; $i<$organizations_count; ++$i) 
    199200                { 
    200201                        $tmp_array[strtolower($organizations[$i])] = $organizations[$i];         
  • trunk/filemanager/inc/class.notifications.inc.php

    r7655 r7673  
    110110                         
    111111                        $email_to = explode( ",", $result[0]['email_to'] ); 
    112                          
    113                         for( $i = 0 ; $i < count($email_to); ++$i ) 
     112 
     113            $email_to_count = count($email_to); 
     114                        for( $i = 0 ; $i < $email_to_count; ++$i ) 
    114115                        { 
    115116                                if($email_to[$i] == $emailTo) 
  • trunk/filemanager/inc/class.uiconfig.inc.php

    r7655 r7673  
    272272                                $result = $notify->SearchId($_GET['editUser']); 
    273273                                $emails_to = explode(",", $result[0]['email_to']); 
    274                                  
    275                                 for( $i = 0 ; $i < count($emails_to); ++$i ) 
     274 
     275                $emails_to_count = count($emails_to); 
     276                                for( $i = 0 ; $i < $emails_to_count; ++$i ) 
    276277                                { 
    277278                                        $value_email_to .= "<tr>"; 
  • trunk/filemanager/inc/class.uifilemanager.inc.php

    r7655 r7673  
    12111211                                reset($this->files_array); 
    12121212                                $this->readFilesInfo(); 
    1213                                 for ($i = 0; $i < count($this->files_array); ++$i) { 
     1213                $files_array_count = count($this->files_array); 
     1214                                for ($i = 0; $i < $files_array_count; ++$i) { 
    12141215                                        $comment = strtoupper($this->files_array[$i]['comment']); 
    12151216                                        $name = strtoupper($this->files_array[$i]['name']); 
  • trunk/filemanager/tp/dompdf/include/cpdf_adapter.cls.php

    r7655 r7673  
    570570     
    571571    // Adjust y values 
    572     for ( $i = 1; $i < count($points); $i += 2) 
     572    $points_count = count($points); 
     573    for ( $i = 1; $i < $points_count; $i += 2) 
    573574      $points[$i] = $this->y($points[$i]); 
    574575     
  • trunk/filemanager/tp/dompdf/include/text_frame_reflower.cls.php

    r6057 r7673  
    134134    reset($words); 
    135135 
    136     for ($i = 0; $i < count($words); $i += 2) { 
     136    $words_count = count($words); 
     137    for ($i = 0; $i < $words_count; $i += 2) { 
    137138      $word = $words[$i] . (isset($words[$i+1]) ? $words[$i+1] : ""); 
    138139      $word_width = Font_Metrics::get_text_width($word, $font, $size, $word_spacing); 
  • trunk/filemanager/tp/dompdf/lib/class.pdf.php

    r7655 r7673  
    26152615                  $dtmp[$bits2[0]] = array(); 
    26162616 
    2617                   for  ($i = 1;$i<count($bits2);++$i) { 
     2617                  $bits2_count = count($bits2); 
     2618                  for  ($i = 1;$i<$bits2_count;++$i) { 
    26182619 
    26192620                    $dtmp[$bits2[0]][] = $bits2[$i]; 
     
    26612662                    $dtmp[$bits2[0]] = array(); 
    26622663 
    2663                     for  ($i = 1;$i<count($bits2);++$i) { 
     2664                    $bits2_count = count($bits2); 
     2665                    for  ($i = 1;$i<$bits2_count;++$i) { 
    26642666 
    26652667                      $dtmp[$bits2[0]][] = $bits2[$i]; 
  • trunk/home.php

    r7655 r7673  
    108108        $sorted_apps = array(); 
    109109        $user_apps = $GLOBALS['phpgw_info']['user']['apps'];  
    110         @reset($user_apps);      
    111         for($i = 0; $i < count($default_apps);++$i) { 
     110        @reset($user_apps); 
     111        $default_apps_count = count($default_apps); 
     112        for($i = 0; $i < $default_apps_count;++$i) { 
    112113                if(array_key_exists($default_apps[$i], $user_apps)){ 
    113114                        $sorted_apps[] = $default_apps[$i]; 
  • trunk/jabberit_messenger/inc/class.contacts_im.inc.php

    r7655 r7673  
    9292 
    9393                if( is_array($users) ) 
    94                 {        
    95                         for($i = 0; $i < count($users); ++$i) 
     94                { 
     95            $users_count = count($users); 
     96                        for($i = 0; $i < $users_count; ++$i) 
    9697                        { 
    9798                                if( is_array($hostsJabber) ) 
     
    225226 
    226227                        $_restrict = array(); 
    227                          
    228                         for( $i = 0 ; $i < count($orgs) ; ++$i ) 
    229                         { 
    230                                 for( $j = 0 ; $j < count($array_uids) ; ++$j ) 
     228 
     229            $orgs_count = count($orgs); 
     230                        for( $i = 0 ; $i < $orgs_count; ++$i ) 
     231                        { 
     232                $array_uids_count = count($array_uids); 
     233                                for( $j = 0 ; $j < $array_uids_count; ++$j ) 
    231234                                { 
    232235                                        if( trim($array_uids[$j]['ou']) === trim($orgs[$i]) ) 
     
    331334                                                $posAll = $this->strallpos($ou_User, "OU=" ); 
    332335                                                $orgs = array(); 
    333                                  
    334                                                 for( $i = 0 ; $i < count($posAll); ++$i ) 
     336 
     337                        $posAll_count = count($posAll); 
     338                                                for( $i = 0 ; $i < $posAll_count; ++$i ) 
    335339                                                { 
    336340                                                        $pos = strpos($ou_User, ","); 
     
    369373                                                        $posAll = $this->strallpos($ou_User, "OU=" ); 
    370374                                                        $orgs = array(); 
    371                                          
    372                                                         for( $i = 0 ; $i < count($posAll); ++$i ) 
     375 
     376                            $posAll_count = count($posAll); 
     377                                                        for( $i = 0 ; $i < $posAll_count; ++$i ) 
    373378                                                        { 
    374379                                                                $pos = strpos($ou_User, ","); 
  • trunk/jabberit_messenger/inc/class.db_im.inc.php

    r7655 r7673  
    5858                $hostsJabber = unserialize($this->getHostsJabber()); 
    5959                $findHosts      = explode(":", $pItem['item']); 
    60                 $return = "";    
    61                  
    62                 for( $i = 0 ; $i < count($hostsJabber); ++$i ) 
     60                $return = ""; 
     61 
     62        $hostsJabber_count = count($hostsJabber); 
     63                for( $i = 0 ; $i < $hostsJabber_count; ++$i ) 
    6364                        if( $hostsJabber[$i]['org'] == $findHosts[0] && $hostsJabber[$i]['jabberName'] == $findHosts[1] ) 
    6465                        { 
     
    517518                $orgs = array(); 
    518519 
    519                 for( $i = 0 ; $i < count($posAll); ++$i ) 
     520        $posAll_count = count($posAll); 
     521                for( $i = 0 ; $i < $posAll_count; ++$i ) 
    520522                { 
    521523                        $pos = strpos($organization, ","); 
     
    655657                                        if( count($confHostsOrgs) > 0 ) 
    656658                                        { 
    657                                                 for( $i = 0; $i < count($confHostsOrgs); ++$i) 
     659                        $confHostsOrgs_count = count($confHostsOrgs); 
     660                                                for( $i = 0; $i < $confHostsOrgs_count; ++$i) 
    658661                                                        if( $confHostsOrgs[$i]['org'] == $hosts[0] && $confHostsOrgs[$i]['jabberName'] == $hosts[1]) 
    659662                                                                $key = $i;       
  • trunk/jabberit_messenger/inc/class.ldap_im.inc.php

    r7655 r7673  
    125125                { 
    126126                        $confHosts      = $this->hostsJabber; 
    127                          
    128                         for($i = 0; $i < count($confHosts); ++$i ) 
     127 
     128            $confHosts_count = count($confHosts); 
     129                        for($i = 0; $i < $confHosts_count; ++$i ) 
    129130                        { 
    130131                                if( $pData['serverLdap'] == $confHosts[$i]['serverLdap'] ) 
     
    210211                        { 
    211212                                $confHosts      = $this->hostsJabber; 
    212                          
    213                                 for($i = 0; $i < count($confHosts); ++$i ) 
     213 
     214                $confHosts_count = count($confHosts); 
     215                                for($i = 0; $i < $confHosts_count; ++$i ) 
    214216                                { 
    215217                                        if( $this->ldap ) 
     
    279281                { 
    280282                        $confHosts      = $this->hostsJabber; 
    281                  
    282                         for($i = 0; $i < count($confHosts); ++$i ) 
     283 
     284            $confHosts_count = count($confHosts); 
     285                        for($i = 0; $i < $confHosts_count; ++$i ) 
    283286                        { 
    284287                                if( $this->ldap ) 
     
    322325                { 
    323326                        $confHosts      = $this->hostsJabber; 
    324                          
    325                         for($i = 0; $i < count($confHosts); ++$i ) 
     327 
     328            $confHosts_count = count($confHosts); 
     329                        for($i = 0; $i < $confHosts_count; ++$i ) 
    326330                        { 
    327331                                if( $pLdap_host == $confHosts[$i]['serverLdap'] ) 
     
    396400                $result = array(); 
    397401                $return = array(); 
    398                 $conn   = "";            
    399  
    400                 for( $i = 0; $i < count($confHosts); ++$i ) 
     402                $conn   = ""; 
     403 
     404        $confHosts_count = count($confHosts); 
     405                for( $i = 0; $i < $confHosts_count; ++$i ) 
    401406                { 
    402407                        if( $pLdap && $pLdap == $confHosts[$i]['serverLdap'] ) 
  • trunk/jabberit_messenger/inc/login.php

    r7655 r7673  
    8686                 
    8787                if( $voip_enabled ) 
    88                         $pluginsJava[] = "callVoip.jar";                 
    89                  
    90                 for( $i = 0; $i < count($pluginsJava); ++$i ) 
     88                        $pluginsJava[] = "callVoip.jar"; 
     89 
     90        $pluginsJava_count = count($pluginsJava); 
     91                for( $i = 0; $i < $pluginsJava_count; ++$i ) 
    9192                { 
    9293                        $javaFiles       .= $path . "plugins/" . $pluginsJava[$i] . ","; 
  • trunk/jabberit_messenger/jmessenger/inc/class.ContactsIm.inc.php

    r7655 r7673  
    6969                 
    7070                if( is_array($users) ) 
    71                 {        
    72                         for($i = 0; $i < count($users); ++$i) 
     71                { 
     72            $users_count = count($users); 
     73                        for($i = 0; $i < $users_count; ++$i) 
    7374                        { 
    7475                                if( is_array($hostsJabber) ) 
     
    203204 
    204205                        $_restrict = array(); 
    205                          
    206                         for( $i = 0 ; $i < count($orgs) ; ++$i ) 
    207                         { 
    208                                 for( $j = 0 ; $j < count($array_uids) ; ++$j ) 
     206 
     207            $orgs_count = count($orgs); 
     208                        for( $i = 0 ; $i < $orgs_count; ++$i ) 
     209                        { 
     210                $array_uids_count = count($array_uids); 
     211                                for( $j = 0 ; $j < $array_uids_count; ++$j ) 
    209212                                { 
    210213                                        if( trim($array_uids[$j]['ou']) === trim($orgs[$i]) ) 
     
    331334                                                $posAll = $this->strallpos($ou_User, "OU=" ); 
    332335                                                $orgs = array(); 
    333                                  
    334                                                 for( $i = 0 ; $i < count($posAll); ++$i ) 
     336 
     337                        $posAll_count = count($posAll); 
     338                                                for( $i = 0 ; $i < $posAll_count; ++$i ) 
    335339                                                { 
    336340                                                        $pos = strpos($ou_User, ","); 
     
    369373                                                        $posAll = $this->strallpos($ou_User, "OU=" ); 
    370374                                                        $orgs = array(); 
    371                                          
    372                                                         for( $i = 0 ; $i < count($posAll); ++$i ) 
     375 
     376                            $posAll_count = count($posAll); 
     377                                                        for( $i = 0 ; $i < $posAll_count; ++$i ) 
    373378                                                        { 
    374379                                                                $pos = strpos($ou_User, ","); 
  • trunk/jabberit_messenger/jmessenger/inc/class.DataBaseIM.inc.php

    r7655 r7673  
    5757                $hostsJabber = unserialize($this->getHostsJabber()); 
    5858                $findHosts      = explode(":", $pItem['item']); 
    59                 $return = "";    
    60                  
    61                 for( $i = 0 ; $i < count($hostsJabber); ++$i ) 
     59                $return = ""; 
     60 
     61        $hostsJabber_count = count($hostsJabber); 
     62                for( $i = 0 ; $i < $hostsJabber_count; ++$i ) 
    6263                        if( $hostsJabber[$i]['org'] == $findHosts[0] && $hostsJabber[$i]['jabberName'] == $findHosts[1] ) 
    6364                        { 
     
    490491                $orgs = array(); 
    491492 
    492                 for( $i = 0 ; $i < count($posAll); ++$i ) 
     493        $posAll_count = count($posAll); 
     494                for( $i = 0 ; $i < $posAll_count; ++$i ) 
    493495                { 
    494496                        $pos = strpos($organization, ","); 
     
    628630                                        if( count($confHostsOrgs) > 0 ) 
    629631                                        { 
    630                                                 for( $i = 0; $i < count($confHostsOrgs); ++$i) 
     632                        $confHostsOrgs_count = count($confHostsOrgs); 
     633                                                for( $i = 0; $i < $confHostsOrgs_count; ++$i) 
    631634                                                        if( $confHostsOrgs[$i]['org'] == $hosts[0] && $confHostsOrgs[$i]['jabberName'] == $hosts[1]) 
    632635                                                                $key = $i;       
  • trunk/jabberit_messenger/jmessenger/inc/class.LdapIM.inc.php

    r7655 r7673  
    124124                { 
    125125                        $confHosts      = $this->hostsJabber; 
    126                          
    127                         for($i = 0; $i < count($confHosts); ++$i ) 
     126 
     127            $confHosts_count = count($confHosts); 
     128                        for($i = 0; $i < $confHosts_count; ++$i ) 
    128129                        { 
    129130                                if( $pData['serverLdap'] == $confHosts[$i]['serverLdap'] ) 
     
    209210                        { 
    210211                                $confHosts      = $this->hostsJabber; 
    211                          
    212                                 for($i = 0; $i < count($confHosts); ++$i ) 
     212 
     213                $confHosts_count = count($confHosts); 
     214                                for($i = 0; $i < $confHosts_count; ++$i ) 
    213215                                { 
    214216                                        if( $this->ldap ) 
     
    278280                { 
    279281                        $confHosts      = $this->hostsJabber; 
    280                  
    281                         for($i = 0; $i < count($confHosts); ++$i ) 
     282 
     283            $confHosts_count = count($confHosts); 
     284                        for($i = 0; $i < $confHosts_count; ++$i ) 
    282285                        { 
    283286                                if( $this->ldap ) 
     
    321324                { 
    322325                        $confHosts      = $this->hostsJabber; 
    323                          
    324                         for($i = 0; $i < count($confHosts); ++$i ) 
     326 
     327            $confHosts_count = count($confHosts); 
     328                        for($i = 0; $i < $confHosts_count; ++$i ) 
    325329                        { 
    326330                                if( $pLdap_host == $confHosts[$i]['serverLdap'] ) 
     
    399403                        $confHosts      = $this->hostsJabber;    
    400404 
    401                         for( $i = 0; $i < count($confHosts); ++$i ) 
     405            $confHosts_count = count($confHosts); 
     406                        for( $i = 0; $i < $confHosts_count; ++$i ) 
    402407                        { 
    403408                                if( trim($host) === trim($confHosts[$i]['jabberName']) ) 
     
    452457                $result = array(); 
    453458                $return = array(); 
    454                 $conn   = "";            
    455  
    456                 for( $i = 0; $i < count($confHosts); ++$i ) 
     459                $conn   = ""; 
     460 
     461        $confHosts_count = count($confHosts); 
     462                for( $i = 0; $i < $confHosts_count; ++$i ) 
    457463                { 
    458464                        if( $pLdap && $pLdap == $confHosts[$i]['serverLdap'] ) 
  • trunk/library/Mail/Mail/RFC822.php

    r7655 r7673  
    332332        $string = $parts[0]; 
    333333 
    334         for ($i = 0; $i < count($parts); ++$i) { 
     334        $parts_count = count($parts); 
     335        for ($i = 0; $i < $parts_count; ++$i) { 
    335336            if ($this->_hasUnclosedQuotes($string) 
    336337                || $this->_hasUnclosedBrackets($string, '<>') 
     
    426427    { 
    427428        $parts = explode($char, $string); 
    428         for ($i = 0; $i < count($parts); ++$i){ 
     429        $parts_count = count($parts); 
     430        for ($i = 0; $i < $parts_count; ++$i){ 
    429431            if (substr($parts[$i], -1) == '\\' || $this->_hasUnclosedQuotes($parts[$i])) 
    430432                $num--; 
     
    500502        //                         geezer 
    501503        // ... or any other format valid by RFC 822. 
    502         for ($i = 0; $i < count($addresses); ++$i) { 
     504        $addresses_count = count($addresses); 
     505        for ($i = 0; $i < $addresses_count; ++$i) { 
    503506            if (!$this->validateMailbox($addresses[$i])) { 
    504507                if (empty($this->error)) { 
  • trunk/library/Mail/Mail/smtpmx.php

    r5146 r7673  
    436436                return false; 
    437437            } 
    438             for ($i = 0; $i < count($mxHost); ++$i) { 
     438            $mxHost_count = count($mxHost); 
     439            for ($i = 0; $i < $mxHost_count; ++$i) { 
    439440                $mx[$mxHost[$i]] = $mxWeight[$i]; 
    440441            } 
  • trunk/library/Net/Sieve.php

    r7655 r7673  
    929929        $data = preg_split('/\r?\n/', $this->_toUpper($data), -1, PREG_SPLIT_NO_EMPTY); 
    930930 
    931         for ($i = 0; $i < count($data); ++$i) { 
     931        $data_count = count($data); 
     932        for ($i = 0; $i < $data_count; ++$i) { 
    932933            if (!preg_match('/^"([A-Z]+)"( "(.*)")?$/', $data[$i], $matches)) { 
    933934                continue; 
  • trunk/library/PEAR/PEAR/Frontend/CLI.php

    r7655 r7673  
    579579    { 
    580580        $highest = 1; 
    581         for ($i = 0; $i < count($columns); ++$i) { 
     581        $columns_count = count($columns); 
     582        for ($i = 0; $i < $columns_count; ++$i) { 
    582583            $col = &$columns[$i]; 
    583584            if (isset($colparams[$i]) && !empty($colparams[$i]['wrap'])) { 
     
    672673        } 
    673674 
    674         for ($i = 0; $i < count($table_data); ++$i) { 
     675        $table_data_count = count($table_data); 
     676        for ($i = 0; $i < $table_data_count; ++$i) { 
    675677            extract($table_data[$i]); 
    676678            if (!is_array($rowparams)) { 
     
    684686            $rowlines = array(); 
    685687            if ($height > 1) { 
    686                 for ($c = 0; $c < count($data); $c++) { 
     688                $data_count = count($data); 
     689                for ($c = 0; $c < $data_count; $c++) { 
    687690                    $rowlines[$c] = preg_split('/(\r?\n|\r)/', $data[$c]); 
    688691                    if (count($rowlines[$c]) < $height) { 
     
    691694                } 
    692695            } else { 
    693                 for ($c = 0; $c < count($data); ++$c) { 
     696                $data_count = count($data); 
     697                for ($c = 0; $c < $data_count; ++$c) { 
    694698                    $rowlines[$c] = array($data[$c]); 
    695699                } 
     
    698702            for ($r = 0; $r < $height; ++$r) { 
    699703                $rowtext = ''; 
    700                 for ($c = 0; $c < count($data); ++$c) { 
     704                $data_count = count($data); 
     705                for ($c = 0; $c < $data_count; ++$c) { 
    701706                    if (isset($colparams[$c])) { 
    702707                        $attribs = array_merge($rowparams, $colparams); 
  • trunk/library/PEAR/PEAR/PackageFile/v2.php

    r7655 r7673  
    329329        $mymaintainers = $this->getMaintainers(); 
    330330        $yourmaintainers = $pf1->getMaintainers(); 
    331         for ($i1 = 0; $i1 < count($yourmaintainers); ++$i1) { 
     331        $yourmaintainers_count = count($yourmaintainers); 
     332        for ($i1 = 0; $i1 < $yourmaintainers_count; ++$i1) { 
    332333            $reset = false; 
    333             for ($i2 = 0; $i2 < count($mymaintainers); ++$i2) { 
     334            $mymaintainers_count = count($mymaintainers); 
     335            for ($i2 = 0; $i2 < $mymaintainers_count; ++$i2) { 
    334336                if ($mymaintainers[$i2]['handle'] == $yourmaintainers[$i1]['handle']) { 
    335337                    if ($mymaintainers[$i2]['role'] != $yourmaintainers[$i1]['role']) { 
     
    12131215            } 
    12141216 
    1215             for ($i = 0; $i < count($releases['configureoption']); ++$i) { 
     1217            $releases_count = count($releases['configureoption']); 
     1218            for ($i = 0; $i < $releases_count; ++$i) { 
    12161219                $releases['configureoption'][$i] = $releases['configureoption'][$i]['attribs']; 
    12171220            } 
  • trunk/library/ckeditor/plugins/aspell/spellerpages/server-scripts/spellchecker.php

    r7655 r7673  
    8282        # open temp file, add the submitted text. 
    8383        if( $fh = fopen( $tempfile, 'w' )) { 
    84                 for( $i = 0; $i < count( $textinputs ); ++$i ) { 
     84        $textinputs_count = count( $textinputs ); 
     85                for( $i = 0; $i < $textinputs_count; ++$i ) { 
    8586                        $text = urldecode( $textinputs[$i] ); 
    8687                        $text = html_entity_decode ($text , ENT_QUOTES , 'UTF-8'  ); 
  • trunk/library/csstidy/class.csstidy.php

    r7655 r7673  
    419419        $template = explode('|',$content); 
    420420 
    421         for ($i = 0; $i < count($template); ++$i ) 
     421    $template_count = count($template); 
     422        for ($i = 0; $i < $template_count; ++$i ) 
    422423        { 
    423424                $this->template[$i] = $template[$i]; 
  • trunk/library/csstidy/class.csstidy_optimise.php

    r7655 r7673  
    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            $color_tmp_count = count($color_tmp); 
     305            for ( $i = 0; $i < $color_tmp_count; ++$i ) 
    305306            { 
    306307                $color_tmp[$i] = trim ($color_tmp[$i]); 
     
    383384            $temp = array($subvalue); 
    384385        } 
    385         for ($l = 0; $l < count($temp); ++$l) 
     386        $temp_count = count($temp); 
     387        for ($l = 0; $l < $temp_count; ++$l) 
    386388        { 
    387389            // continue if no numeric value 
     
    665667 
    666668        $str_value = csstidy_optimise::explode_ws(',',$str_value); 
    667         for($i = 0; $i < count($str_value); ++$i) 
     669        $str_value_count = count($str_value); 
     670        for($i = 0; $i < $str_value_count; ++$i) 
    668671        { 
    669672            $have['clip'] = FALSE; $have['pos'] = FALSE; 
     
    672675            $str_value[$i] = csstidy_optimise::explode_ws(' ',trim($str_value[$i])); 
    673676 
    674             for($j = 0; $j < count($str_value[$i]); ++$j) 
     677            $str_value_count = count($str_value[$i]); 
     678            for($j = 0; $j < $str_value_count; ++$j) 
    675679            { 
    676680                if($have['bg'] === FALSE && (substr($str_value[$i][$j],0,4) == 'url(' || $str_value[$i][$j] === 'none')) 
  • trunk/library/csstidy/css_optimiser.php

    r7655 r7673  
    322322                        { 
    323323                                echo '<dt>'.$line.'</dt>'; 
    324                                 for($i = 0; $i < count($array); ++$i) 
     324                $array_count = count($array); 
     325                                for($i = 0; $i < $array_count; ++$i) 
    325326                                { 
    326327                                        echo '<dd class="'.$array[$i]['t'].'">'.$array[$i]['m'].'</dd>'; 
  • trunk/library/mime/mime.php

    r7655 r7673  
    895895        case !$text && !$html && $attachments: 
    896896            $message =& $this->_addMixedPart(); 
    897             for ($i = 0; $i < count($this->_parts); ++$i) { 
     897            $parts_count = count($this->_parts); 
     898            for ($i = 0; $i < $parts_count; ++$i) { 
    898899                $this->_addAttachmentPart($message, $this->_parts[$i]); 
    899900            } 
     
    903904            $message =& $this->_addMixedPart(); 
    904905            $this->_addTextPart($message, $this->_txtbody); 
    905             for ($i = 0; $i < count($this->_parts); ++$i) { 
     906            $parts_count = count($this->_parts); 
     907            for ($i = 0; $i < $parts_count; ++$i) { 
    906908                $this->_addAttachmentPart($message, $this->_parts[$i]); 
    907909            } 
     
    930932                $ht =& $this->_addRelatedPart($message); 
    931933                $this->_addHtmlPart($ht); 
    932                 for ($i = 0; $i < count($this->_html_images); ++$i) { 
     934                $html_images_count = count($this->_html_images); 
     935                for ($i = 0; $i < $html_images_count; ++$i) { 
    933936                    $this->_addHtmlImagePart($ht, $this->_html_images[$i]); 
    934937                } 
     
    939942                $message =& $this->_addRelatedPart($null); 
    940943                $this->_addHtmlPart($message); 
    941                 for ($i = 0; $i < count($this->_html_images); ++$i) { 
     944                $html_images_count = count($this->_html_images); 
     945                for ($i = 0; $i < $html_images_count; ++$i) { 
    942946                    $this->_addHtmlImagePart($message, $this->_html_images[$i]); 
    943947                } 
     
    958962                $this->_addHtmlPart($message); 
    959963            } 
    960             for ($i = 0; $i < count($this->_html_images); ++$i) { 
     964            $html_images_count = count($this->_html_images); 
     965            for ($i = 0; $i < $html_images_count; ++$i) { 
    961966                $this->_addHtmlImagePart($message, $this->_html_images[$i]); 
    962967            } 
     
    973978                $this->_addHtmlPart($message); 
    974979            } 
    975             for ($i = 0; $i < count($this->_parts); ++$i) { 
     980            $parts_count = count($this->_parts); 
     981            for ($i = 0; $i < $parts_count; ++$i) { 
    976982                $this->_addAttachmentPart($message, $this->_parts[$i]); 
    977983            } 
     
    989995            } 
    990996            $this->_addHtmlPart($rel); 
    991             for ($i = 0; $i < count($this->_html_images); ++$i) { 
     997                    $html_images_count = count($this->_html_images); 
     998            for ($i = 0; $i < $html_images_count; ++$i) { 
    992999                $this->_addHtmlImagePart($rel, $this->_html_images[$i]); 
    9931000            } 
    994             for ($i = 0; $i < count($this->_parts); ++$i) { 
     1001                    $parts_count = count($this->_parts); 
     1002            for ($i = 0; $i < $parts_count; ++$i) { 
    9951003                $this->_addAttachmentPart($message, $this->_parts[$i]); 
    9961004            } 
     
    10081016                                $this->_addHtmlPart($message); 
    10091017            } 
    1010                          
    1011             for ($i = 0; $i < count($this->_html_images); ++$i) { 
     1018 
     1019                        $html_images_count = count($this->_html_images); 
     1020            for ($i = 0; $i < $html_images_count; ++$i) { 
    10121021                $this->_addHtmlImagePart($message, $this->_html_images[$i]); 
    10131022            } 
    1014             for ($i = 0; $i < count($this->_parts); ++$i) { 
     1023            $parts_count = count($this->_parts); 
     1024            for ($i = 0; $i < $parts_count; ++$i) { 
    10151025                $this->_addAttachmentPart($message, $this->_parts[$i]); 
    10161026            } 
  • trunk/library/mime/mimeDecode.php

    r7655 r7673  
    326326 
    327327                    $parts = $this->_boundarySplit($body, $content_type['other']['boundary']); 
    328                     for ($i = 0; $i < count($parts); ++$i) { 
     328                    $parts_count = count($parts); 
     329                    for ($i = 0; $i < $parts_count; ++$i) { 
    329330                        list($part_header, $part_body) = $this->_splitBodyHeader($parts[$i]); 
    330331                        $part = $this->_decode($part_header, $part_body, $default_ctype); 
     
    386387                $return[$prepend . $mime_number] = &$structure; 
    387388            } 
    388             for ($i = 0; $i < count($structure->parts); ++$i) { 
    389  
     389            $structure_parts_count = count($structure->parts); 
     390            for ($i = 0; $i < $structure_parts_count; ++$i) { 
    390391             
    391392                if (!empty($structure->headers['content-type']) AND substr(strtolower($structure->headers['content-type']), 0, 8) == 'message/') { 
     
    792793        preg_match_all("/begin ([0-7]{3}) (.+)\r?\n(.+)\r?\nend/Us", $input, $matches); 
    793794 
    794         for ($j = 0; $j < count($matches[3]); ++$j) { 
     795        $matches_count = count($matches[3]); 
     796        for ($j = 0; $j < $matches_count; ++$j) { 
    795797 
    796798            $str      = $matches[3][$j]; 
     
    943945            // Multiple headers with this name 
    944946            if (is_array($headers[$hdr_name])) { 
    945                 for ($i = 0; $i < count($hdr_value); ++$i) { 
     947                $hdr_value_count = count($hdr_value); 
     948                for ($i = 0; $i < $hdr_value_count; ++$i) { 
    946949                    $output .= Mail_mimeDecode::_getXML_helper($hdr_name, $hdr_value[$i], $indent); 
    947950                } 
     
    954957 
    955958        if (!empty($input->parts)) { 
    956             for ($i = 0; $i < count($input->parts); ++$i) { 
     959            $parts_count = count($input->parts); 
     960            for ($i = 0; $i < $parts_count; ++$i) { 
    957961                $output .= $crlf . str_repeat($htab, $indent) . '<mimepart>' . $crlf . 
    958962                           Mail_mimeDecode::_getXML($input->parts[$i], $indent+1) . 
  • trunk/library/mime/mimePart.php

    r7655 r7673  
    283283            $encoded['body'] = '';  
    284284 
    285             for ($i = 0; $i < count($this->_subparts); ++$i) { 
     285            $subparts_count = count($this->_subparts); 
     286            for ($i = 0; $i < $subparts_count; ++$i) { 
    286287                $encoded['body'] .= '--' . $boundary . $eol; 
    287288                $tmp = $this->_subparts[$i]->encode(); 
     
    393394 
    394395        if (count($this->_subparts)) { 
    395             for ($i = 0; $i < count($this->_subparts); ++$i) { 
     396            $subparts_count = count($this->_subparts); 
     397            for ($i = 0; $i < $subparts_count; ++$i) { 
    396398                fwrite($fh, $f_eol . '--' . $boundary . $eol); 
    397399                $res = $this->_subparts[$i]->_encodePartToFile($fh); 
  • trunk/listAdmin/inc/class.db_functions.inc.php

    r7655 r7673  
    282282                while($this->db->next_record()) 
    283283                        $user_app[] = $this->db->row(); 
    284                  
    285                 for ($i=0; $i<count($user_app); ++$i) 
     284 
     285        $user_app_count = count($user_app); 
     286                for ($i=0; $i<$user_app_count; ++$i) 
    286287                        $return['groups'][] = $user_app[$i]['acl_location']; 
    287288                 
  • trunk/listAdmin/inc/class.ldap_functions.inc.php

    r7655 r7673  
    746746                $entry[0]['dn'] = strtolower($entry[0]['dn']); 
    747747                $sector_dn_array = explode(",", $entry[0]['dn']); 
    748                 for($i=1; $i<count($sector_dn_array); ++$i) 
     748        $sector_dn_array_count = count($sector_dn_array); 
     749                for($i=1; $i<$sector_dn_array_count; ++$i) 
    749750                        $sector_dn .= $sector_dn_array[$i] . ','; 
    750751                //Retira ultimo pipe. 
     
    844845                $entry[0]['dn'] = strtolower($entry[0]['dn']); 
    845846                $sector_dn_array = explode(",", $entry[0]['dn']); 
    846                 for($i=1; $i<count($sector_dn_array); ++$i) 
     847        $sector_dn_array_count = count($sector_dn_array); 
     848                for($i=1; $i<$sector_dn_array_count; ++$i) 
    847849                        $sector_dn .= $sector_dn_array[$i] . ','; 
    848850                //Retira ultimo pipe. 
     
    925927                $entry[0]['dn'] = strtolower($entry[0]['dn']); 
    926928                $sector_dn_array = explode(",", $entry[0]['dn']); 
    927                 for($i=1; $i<count($sector_dn_array); ++$i) 
     929        $sector_dn_array_count = count($sector_dn_array); 
     930                for($i=1; $i<$sector_dn_array_count; ++$i) 
    928931                        $sector_dn .= $sector_dn_array[$i] . ','; 
    929932                //Retira ultimo pipe. 
     
    10061009                $entry[0]['dn'] = strtolower($entry[0]['dn']); 
    10071010                $sector_dn_array = explode(",", $entry[0]['dn']); 
    1008                 for($i=1; $i<count($sector_dn_array); ++$i) 
     1011        $sector_dn_array_count = count($sector_dn_array); 
     1012                for($i=1; $i<$sector_dn_array_count; ++$i) 
    10091013                        $sector_dn .= $sector_dn_array[$i] . ','; 
    10101014                //Retira ultimo pipe. 
     
    10861090                $entry[0]['dn'] = strtolower($entry[0]['dn']); 
    10871091                $sector_dn_array = explode(",", $entry[0]['dn']); 
    1088                 for($i=1; $i<count($sector_dn_array); ++$i) 
     1092        $sector_dn_array_count = count($sector_dn_array); 
     1093                for($i=1; $i<$sector_dn_array_count; ++$i) 
    10891094                        $sector_dn .= $sector_dn_array[$i] . ','; 
    10901095                //Retira ultimo pipe. 
  • trunk/phpgwapi/inc/adodb/session/adodb-session.php

    r6057 r7673  
    4848        $variables = array( ); 
    4949        $a = preg_split( '/(\w+)\|/', $serialized_string, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE ); 
    50         for( $i = 0; $i < count( $a ); $i = $i+2 ) { 
     50    $a_count = count( $a ); 
     51        for( $i = 0; $i < $a_count; $i = $i+2 ) { 
    5152                $variables[$a[$i]] = unserialize( $a[$i+1] ); 
    5253        } 
  • trunk/phpgwapi/inc/adodb/session/adodb-session2.php

    r6057 r7673  
    7878        $variables = array( ); 
    7979        $a = preg_split( '/(\w+)\|/', $serialized_string, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE ); 
    80         for( $i = 0; $i < count( $a ); $i = $i+2 ) { 
     80    $a_count = count( $a ); 
     81        for( $i = 0; $i < $a_count; $i = $i+2 ) { 
    8182                $variables[$a[$i]] = unserialize( $a[$i+1] ); 
    8283        } 
  • trunk/phpgwapi/inc/class.accounts.inc.php

    r7655 r7673  
    436436                        $this->memberships = Array(); 
    437437 
    438                         for ($idx=0; $idx<count($security_equals); ++$idx) 
     438            $security_equals_count = count($security_equals); 
     439                        for ($idx=0; $idx<$security_equals_count; ++$idx) 
    439440                        { 
    440441                                $groups = (int)$security_equals[$idx]; 
     
    463464                        } 
    464465 
    465                         for ($idx=0; $idx<count($security_equals); ++$idx) 
     466            $security_equals_count = count($security_equals); 
     467                        for ($idx=0; $idx<$security_equals_count; ++$idx) 
    466468                        { 
    467469                                $name = $this->id2name((int)$security_equals[$idx]); 
  • trunk/phpgwapi/inc/class.accounts_contacts.inc.php

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

    r7655 r7673  
    277277                                        $members = $this->member($this->account_id); 
    278278                                        $newData['memberuid'] = array(); 
    279                                         for($i=0;$i<count($members);++$i) 
     279                    $members_count = count($members); 
     280                                        for($i=0;$i<$members_count;++$i) 
    280281                                        { 
    281282                                                $currname = $this->id2name($members[$i]['account_id']); 
     
    308309                                        #_debug_array($members); 
    309310                                        $newData['memberuid'] = array(); 
    310                                         for($i=0;$i<count($members);++$i) 
     311                    $members_count = count($members); 
     312                                        for($i=0;$i<$members_count;++$i) 
    311313                                        { 
    312314                                                $currname = $this->id2name($members[$i]['account_id']); 
  • trunk/phpgwapi/inc/class.categories.inc.php

    r7655 r7673  
    422422                        if($self) 
    423423                        { 
    424                                 for ($i=0;$i<count($cats);++$i) 
     424                $cats_count = count($cats); 
     425                                for ($i=0;$i<$cats_count;++$i) 
    425426                                { 
    426427                                        if ($cats[$i]['id'] == $self) 
     
    467468                                if ($this->total_records > 0) 
    468469                                { 
    469                                         for ($i=0;$i<count($cats);++$i) 
     470                    $cats_count = count($cats); 
     471                                        for ($i=0;$i<$cats_count;++$i) 
    470472                                        { 
    471473                                                $image_set = '&nbsp;'; 
     
    576578                                $new_parent = $this->id2name($cat_id,'parent'); 
    577579 
    578                                 for ($i=0;$i<count($cats);++$i) 
     580                $cats_count = count($cats); 
     581                                for ($i=0;$i<$cats_count;++$i) 
    579582                                { 
    580583                                        if ($cats[$i]['level'] == 1) 
  • trunk/phpgwapi/inc/class.common.inc.php

    r7655 r7673  
    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            $errors_count = count($errors); 
     438                        for ($i=1; $i<$errors_count; ++$i) 
    438439                        { 
    439440                                $html_error .= '<tr><td>&nbsp;</td><td align="left">' . $errors[$i] . '</td></tr>'; 
  • trunk/phpgwapi/inc/class.contacts_ldap.inc.php

    r7655 r7673  
    328328                                { 
    329329                                        $i=0; 
    330                                         for($i=0;$i<count($filterarray);++$i) 
     330                    $filterarray_count = count($filterarray); 
     331                                        for($i=0;$i<$filterarray_count;++$i) 
    331332                                        { 
    332333                                                list($name,$value) = preg_split('/=/',$filterarray[$i]); 
  • trunk/phpgwapi/inc/class.errorlog.inc.php

    r7655 r7673  
    124124 
    125125                        $errorstack = $this->errorstack; 
    126                         for ($i = 0; $i < count($errorstack); ++$i) 
     126            $errorstack_count = count($errorstack); 
     127                        for ($i = 0; $i < $errorstack_count; ++$i) 
    127128                        { 
    128129                                $err = $errorstack[$i]; 
     
    153154                        $new = array(); 
    154155                        reset($this->errorstack); 
    155                         for ($i = 0; $i < count($this->errorstack); ++$i) 
     156            $errorstack_count = count($this->errorstack); 
     157                        for ($i = 0; $i < $errorstack_count; ++$i) 
    156158                        { 
    157159                                $err = $this->errorstack[$i]; 
     
    182184 
    183185                        $errorstack = $this->errorstack; 
    184                         for ($i = 0; $i < count($errorstack); ++$i) 
     186            $errorstack_count = count($errorstack); 
     187                        for ($i = 0; $i < $errorstack_count; ++$i) 
    185188                        { 
    186189                                $err = $errorstack[$i]; 
  • trunk/phpgwapi/inc/class.gdgraph.inc.php

    r7655 r7673  
    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            $data_count = count($this->data); 
     277                        for ($i = 0;$i<$data_count;++$i) 
    277278                        { 
    278279                                $y = $this->graph_height - $this->margin_bottom - ($space * $linespace) - 7; 
  • trunk/phpgwapi/inc/class.http.inc.php

    r5912 r7673  
    265265                                                return('5 it was not specified a valid POST method values array'); 
    266266                                        } 
    267                                         for($request_body = '',Reset($values),$value=0;$value<count($values);Next($values),$value++) 
     267                    $values_count = count($values); 
     268                                        for($request_body = '',Reset($values),$value=0;$value<$values_count;Next($values),$value++) 
    268269                                        { 
    269270                                                if($value>0) 
     
    296297                                        if(@is_array($header_value)) 
    297298                                        { 
    298                                                 for(Reset($header_value),$value=0;$value<count($header_value);Next($header_value),$value++) 
     299                        $header_value_count = count($header_value); 
     300                                                for(Reset($header_value),$value=0;$value<$header_value_count;Next($header_value),$value++) 
    299301                                                { 
    300302                                                        if(!$success = $this->PutLine("$header_name: ".$header_value[Key($header_value)])) 
     
    327329                                        { 
    328330                                                $now = gmdate('Y-m-d H-i-s'); 
    329                                                 for($cookies = array(),$domain=0,Reset($this->cookies[0]);$domain<count($this->cookies[0]);Next($this->cookies[0]),$domain++) 
     331                        $cookies_count = count($this->cookies[0]); 
     332                                                for($cookies = array(),$domain=0,Reset($this->cookies[0]);$domain<$cookies_count;Next($this->cookies[0]),$domain++) 
    330333                                                { 
    331334                                                        $domain_pattern = Key($this->cookies[0]); 
     
    335338                                                                ($match == 0 || $domain_pattern[0] == '.' || $this->request_host[$match-1] == '.')) 
    336339                                                        { 
    337                                                                 for(Reset($this->cookies[0][$domain_pattern]),$path_part=0;$path_part<count($this->cookies[0][$domain_pattern]);Next($this->cookies[0][$domain_pattern]),$path_part++) 
     340                                $cookies_count = count($this->cookies[0][$domain_pattern]); 
     341                                                                for(Reset($this->cookies[0][$domain_pattern]),$path_part=0;$path_part<$cookies_count;Next($this->cookies[0][$domain_pattern]),$path_part++) 
    338342                                                                { 
    339343                                                                        $path = Key($this->cookies[0][$domain_pattern]); 
    340344                                                                        if(strlen($this->request_uri) >= strlen($path) && substr($this->request_uri,0,strlen($path)) == $path) 
    341345                                                                        { 
    342                                                                                 for(Reset($this->cookies[0][$domain_pattern][$path]),$cookie = 0;$cookie<count($this->cookies[0][$domain_pattern][$path]);Next($this->cookies[0][$domain_pattern][$path]),$cookie++) 
     346                                        $cookies_count = count($this->cookies[0][$domain_pattern][$path]); 
     347                                                                                for(Reset($this->cookies[0][$domain_pattern][$path]),$cookie = 0;$cookie<$cookies_count;Next($this->cookies[0][$domain_pattern][$path]),$cookie++) 
    343348                                                                                { 
    344349                                                                                        $cookie_name = Key($this->cookies[0][$domain_pattern][$path]); 
     
    353358                                                        } 
    354359                                                } 
    355                                                 for(Reset($cookies),$cookie=0;$cookie<count($cookies);Next($cookies),$cookie++) 
     360                        $cookies_count = count($cookies); 
     361                                                for(Reset($cookies),$cookie=0;$cookie<$cookies_count;Next($cookies),$cookie++) 
    356362                                                { 
    357363                                                        $cookie_name = Key($cookies); 
     
    525531                        { 
    526532                                $secure = Key($this->cookies); 
    527                                 for($domain = 0,Reset($this->cookies[$secure]);$domain<count($this->cookies[$secure]);Next($this->cookies[$secure]),$domain++) 
     533                $cookies_count = count($this->cookies[$secure]); 
     534                                for($domain = 0,Reset($this->cookies[$secure]);$domain<$cookies_count;Next($this->cookies[$secure]),$domain++) 
    528535                                { 
    529536                                        $domain_pattern = Key($this->cookies[$secure]); 
    530                                         for(Reset($this->cookies[$secure][$domain_pattern]),$path_part=0;$path_part<count($this->cookies[$secure][$domain_pattern]);Next($this->cookies[$secure][$domain_pattern]),$path_part++) 
     537                    $cookies_count = count($this->cookies[$secure][$domain_pattern]); 
     538                                        for(Reset($this->cookies[$secure][$domain_pattern]),$path_part=0;$path_part<$cookies_count;Next($this->cookies[$secure][$domain_pattern]),$path_part++) 
    531539                                        { 
    532540                                                $path=Key($this->cookies[$secure][$domain_pattern]); 
    533                                                 for(Reset($this->cookies[$secure][$domain_pattern][$path]),$cookie=0;$cookie<count($this->cookies[$secure][$domain_pattern][$path]);Next($this->cookies[$secure][$domain_pattern][$path]),$cookie++) 
     541                        $cookies_count = count($this->cookies[$secure][$domain_pattern][$path]); 
     542                                                for(Reset($this->cookies[$secure][$domain_pattern][$path]),$cookie=0;$cookie<$cookies_count;Next($this->cookies[$secure][$domain_pattern][$path]),$cookie++) 
    534543                                                { 
    535544                                                        $cookie_name = Key($this->cookies[$secure][$domain_pattern][$path]); 
  • trunk/phpgwapi/inc/class.listbox.inc.php

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

    r7655 r7673  
    9292 
    9393                        $errorstack = $this->errorstack; 
    94                         for ($i = 0; $i < count($errorstack); ++$i) 
     94            $errorstack_count = count($errorstack); 
     95                        for ($i = 0; $i < $errorstack_count; ++$i) 
    9596                        { 
    9697                                $err = $errorstack[$i]; 
     
    115116                        $new = array(); 
    116117                        reset($this->errorstack); 
    117                         for ($i = 0; $i < count($this->errorstack); ++$i) 
     118            $errorstack_count = count($this->errorstack); 
     119                        for ($i = 0; $i < $errorstack_count; ++$i) 
    118120                        { 
    119121                                $err = $this->errorstack[$i]; 
     
    141143 
    142144                        $errorstack = $this->errorstack; 
    143                         for ($i = 0; $i < count($errorstack); ++$i) 
     145            $errorstack_count = count($errorstack); 
     146                        for ($i = 0; $i < $errorstack_count; ++$i) 
    144147                        { 
    145148                                $err = $errorstack[$i]; 
  • trunk/phpgwapi/inc/class.phpmailer.inc.php

    r7655 r7673  
    443443    function MailSend($header, $body) { 
    444444        $to = ""; 
    445         for($i = 0; $i < count($this->to); ++$i) 
     445        $to_count = count($this->to); 
     446        for($i = 0; $i < $to_count; ++$i) 
    446447        { 
    447448            if($i != 0) { $to .= ", "; } 
     
    497498 
    498499        // Attempt to send attach all recipients 
    499         for($i = 0; $i < count($this->to); ++$i) 
     500        $to_count = count($this->to); 
     501        for($i = 0; $i < $to_count; ++$i) 
    500502        { 
    501503            if(!$this->smtp->Recipient($this->to[$i][0])) 
    502504                $bad_rcpt[] = $this->to[$i][0]; 
    503505        } 
    504         for($i = 0; $i < count($this->cc); ++$i) 
     506        $cc_count = count($this->cc); 
     507        for($i = 0; $i < $cc_count; ++$i) 
    505508        { 
    506509            if(!$this->smtp->Recipient($this->cc[$i][0])) 
    507510                $bad_rcpt[] = $this->cc[$i][0]; 
    508511        } 
    509         for($i = 0; $i < count($this->bcc); ++$i) 
     512        $bcc_count = count($this->bcc); 
     513        for($i = 0; $i < $bcc_count; ++$i) 
    510514        { 
    511515            if(!$this->smtp->Recipient($this->bcc[$i][0])) 
     
    515519        if(count($bad_rcpt) > 0) // Create error message 
    516520        { 
    517             for($i = 0; $i < count($bad_rcpt); ++$i) 
     521            $bad_rcpt_count = count($bad_rcpt); 
     522            for($i = 0; $i < $bad_rcpt_count; ++$i) 
    518523            { 
    519524                if($i != 0) { $error .= ", "; } 
     
    645650        if(count($addr) > 1) 
    646651        { 
    647             for($i = 1; $i < count($addr); ++$i) 
     652            $addr_count = count($addr); 
     653            for($i = 1; $i < $addr_count; ++$i) 
    648654                $addr_str .= ", " . $this->AddrFormat($addr[$i]); 
    649655        } 
     
    686692        $line = explode($this->LE, $message); 
    687693        $message = ""; 
    688         for ($i=0 ;$i < count($line); ++$i) 
     694        $line_count = count($line); 
     695        for ($i=0 ;$i < $line_count; ++$i) 
    689696        { 
    690697          $line_part = explode(" ", $line[$i]); 
    691698          $buf = ""; 
    692           for ($e = 0; $e<count($line_part); ++$e) 
     699          $line_part_count = count($line_part); 
     700          for ($e = 0; $e<$line_part_count; ++$e) 
    693701          { 
    694702              $word = $line_part[$e]; 
     
    830838 
    831839        // Add custom headers 
    832         for($index = 0; $index < count($this->CustomHeader); ++$index) 
     840        $CustomHeader_count = count($this->CustomHeader); 
     841        for($index = 0; $index < $CustomHeader_count; ++$index) 
    833842        { 
    834843            $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]),  
     
    10531062 
    10541063        // Add all attachments 
    1055         for($i = 0; $i < count($this->attachment); ++$i) 
     1064        $attachment_count = count($this->attachment); 
     1065        for($i = 0; $i < $attachment_count; ++$i) 
    10561066        { 
    10571067            // Check for string attachment 
     
    13261336    function InlineImageExists() { 
    13271337        $result = false; 
    1328         for($i = 0; $i < count($this->attachment); ++$i) 
     1338        $attachment_count = count($this->attachment); 
     1339        for($i = 0; $i < $attachment_count; ++$i) 
    13291340        { 
    13301341            if($this->attachment[$i][6] == "inline") 
  • trunk/phpgwapi/inc/class.resultbox.inc.php

    r7655 r7673  
    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            $data_count = count($this->data); 
     57                        for ($x = 0; $x < $data_count; ++$x) 
    5758                        { 
    5859                                echo '<tr>'; 
  • trunk/phpgwapi/inc/class.sbox.inc.php

    r7655 r7673  
    139139                { 
    140140                        $out = ''; 
    141                         for($i=0;$i<count($this->weekdays);++$i) 
     141            $weekdays_count = count($this->weekdays); 
     142                        for($i=0;$i<$weekdays_count;++$i) 
    142143                        { 
    143144                                $out .= '<option value="'.$i.'"'.($selected!=$i?'':' selected').'>'.($this->weekdays[$i]!=''?lang($this->weekdays[$i]):'').'</option>'."\n"; 
     
    148149                function nr2weekday($selected = 0) 
    149150                { 
    150                         for($i=0;$i<count($this->weekdays);++$i) 
     151            $weekdays_count = count($this->weekdays); 
     152                        for($i=0;$i<$weekdays_count;++$i) 
    151153                        { 
    152154                                if ($selected > 0 && $selected == $i) 
     
    251253                        $out = '<select name="' . $name . '">'; 
    252254 
    253                         for($i=1;$i<count($arr);++$i) 
     255            $arr_count = count($arr); 
     256                        for($i=1;$i<$arr_count;++$i) 
    254257                        { 
    255258                                $out .= "<option value=\""; 
     
    304307                                if(@is_array($selected)) 
    305308                                { 
    306                                         for($i=0;$i<count($selected);++$i) 
     309                    $selected_count = count($selected); 
     310                                        for($i=0;$i<$selected_count;++$i) 
    307311                                        { 
    308312                                                if ($group['account_id'] == $selected[$i]) 
  • trunk/phpgwapi/inc/class.setup.inc.php

    r7655 r7673  
    302302                                } 
    303303                                $values = explode('.',$value); 
    304                                 for($i = 0; $i < count($values); ++$i) 
     304                $values_count = count($values); 
     305                                for($i = 0; $i < $values_count; ++$i) 
    305306                                { 
    306307                                        if ((int) $values[$i] != (int) $remotes[$i]) 
     
    710711                        $less = 0; 
    711712 
    712                         for($i=0;$i<count($testa);++$i) 
     713            $testa_count = count($testa); 
     714                        for($i=0;$i<$testa_count;++$i) 
    713715                        { 
    714716                                if($DEBUG) { echo'<br>Checking if '. (int)$testa[$i] . ' is less than ' . (int)$testb[$i] . ' ...'; } 
     
    792794                        $less = 0; 
    793795 
    794                         for($i=0;$i<count($testa);++$i) 
     796            $testa_count = count($testa); 
     797                        for($i=0;$i<$testa_count;++$i) 
    795798                        { 
    796799                                if($DEBUG) { echo'<br>Checking if '. (int)$testa[$i] . ' is more than ' . (int)$testb[$i] . ' ...'; } 
  • trunk/phpgwapi/inc/class.soap_server.inc.php

    r7655 r7673  
    359359                                                } 
    360360                                                // validate each param's type 
    361                                                 for($i=0; $i < count($p); ++$i) 
     361                        $p_count = count($p); 
     362                                                for($i=0; $i < $p_count; ++$i) 
    362363                                                { 
    363364                                                        // type not match 
  • trunk/phpgwapi/inc/class.vcard.inc.php

    r7655 r7673  
    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        // $buffer_count = count($buffer); 
     627                // for($i=0;$i<$buffer_count;++$i) 
    627628                // { 
    628629                //     $vcards .= $this->vcard->out($buffer[$i]); 
  • trunk/phpgwapi/inc/common_functions.inc.php

    r7655 r7673  
    10831083                $less = 0; 
    10841084 
    1085                 for ($i=0;$i<count($testa);++$i) 
     1085        $testa_count = count($testa); 
     1086                for ($i=0;$i<$testa_count;++$i) 
    10861087                { 
    10871088                        if ($DEBUG) { echo'<br>Checking if '. (int)$testa[$i] . ' is less than ' . (int)$testb[$i] . ' ...'; } 
     
    11631164                $less = 0; 
    11641165 
    1165                 for ($i=0;$i<count($testa);++$i) 
     1166        $testa_count = count($testa); 
     1167                for ($i=0;$i<$testa_count;++$i) 
    11661168                { 
    11671169                        if ($DEBUG) { echo'<br>Checking if '. (int)$testa[$i] . ' is more than ' . (int)$testb[$i] . ' ...'; } 
  • trunk/phpgwapi/inc/csstidy/class.csstidy.php

    r7655 r7673  
    419419        $template = explode('|',$content); 
    420420 
    421         for ($i = 0; $i < count($template); ++$i ) 
     421    $template_count = count($template); 
     422        for ($i = 0; $i < $template_count; ++$i ) 
    422423        { 
    423424                $this->template[$i] = $template[$i]; 
  • trunk/phpgwapi/inc/csstidy/class.csstidy_optimise.php

    r7655 r7673  
    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            $color_tmp_count = count($color_tmp); 
     305            for ( $i = 0; $i < $color_tmp_count; ++$i ) 
    305306            { 
    306307                $color_tmp[$i] = trim ($color_tmp[$i]); 
     
    383384            $temp = array($subvalue); 
    384385        } 
    385         for ($l = 0; $l < count($temp);++$l) 
     386        $temp_count = count($temp); 
     387        for ($l = 0; $l < $temp_count;++$l) 
    386388        { 
    387389            // continue if no numeric value 
     
    665667 
    666668        $str_value = csstidy_optimise::explode_ws(',',$str_value); 
    667         for($i = 0; $i < count($str_value); ++$i) 
     669        $str_value_count = count($str_value); 
     670        for($i = 0; $i < $str_value_count; ++$i) 
    668671        { 
    669672            $have['clip'] = FALSE; $have['pos'] = FALSE; 
     
    672675            $str_value[$i] = csstidy_optimise::explode_ws(' ',trim($str_value[$i])); 
    673676 
    674             for($j = 0; $j < count($str_value[$i]); ++$j) 
     677            $str_value_count = count($str_value[$i]); 
     678            for($j = 0; $j < $str_value_count; ++$j) 
    675679            { 
    676680                if($have['bg'] === FALSE && (substr($str_value[$i][$j],0,4) == 'url(' || $str_value[$i][$j] === 'none')) 
  • trunk/phpgwapi/inc/fpdf/fpdf.php

    r7655 r7673  
    12831283                { 
    12841284                        $trns=''; 
    1285                         for($i=0;$i<count($info['trns']);++$i) 
     1285            $info_trns_count = count($info['trns']); 
     1286                        for($i=0;$i<$info_trns_count;++$i) 
    12861287                                $trns.=$info['trns'][$i].' '.$info['trns'][$i].' '; 
    12871288                        $this->_out('/Mask ['.$trns.']'); 
  • trunk/phpgwapi/inc/fpdf/tutorial/tuto5.php

    r7655 r7673  
    3838        $w=array(40,35,40,45); 
    3939        //Header 
    40         for($i=0;$i<count($header);++$i) 
     40    $header_count = count($header); 
     41        for($i=0;$i<$header_count;++$i) 
    4142                $this->Cell($w[$i],7,$header[$i],1,0,'C'); 
    4243        $this->Ln(); 
     
    6566        //Header 
    6667        $w=array(40,35,40,45); 
    67         for($i=0;$i<count($header);++$i) 
     68    $header_count = count($header); 
     69        for($i=0;$i<$header_count;++$i) 
    6870                $this->Cell($w[$i],7,$header[$i],1,0,'C',1); 
    6971        $this->Ln(); 
  • trunk/phpgwapi/templates/classic/login_classic.php

    r7655 r7673  
    238238                $obj_organization = CreateObject('phpgwapi.sector_search_ldap'); 
    239239                $organizations = $obj_organization->organization_search($GLOBALS['phpgw_info']['server']['ldap_context']); 
    240                  
    241                 for ($i=0; $i<count($organizations); ++$i) 
     240 
     241        $organizations_count = count($organizations); 
     242                for ($i=0; $i<$organizations_count; ++$i) 
    242243                { 
    243244                        $tmp_array[strtolower($organizations[$i])] = $organizations[$i];         
  • trunk/phpgwapi/templates/default/login_default.php

    r7655 r7673  
    350350                $obj_organization = CreateObject('phpgwapi.sector_search_ldap'); 
    351351                $organizations = $obj_organization->organization_search($GLOBALS['phpgw_info']['server']['ldap_context']); 
    352                  
    353                 for ($i=0; $i<count($organizations); ++$i) 
     352 
     353        $organizations_count = count($organizations); 
     354                for ($i=0; $i<$organizations_count; ++$i) 
    354355                { 
    355356                        $tmp_array[strtolower($organizations[$i])] = $organizations[$i];         
  • trunk/phpgwapi/templates/news/login_news.php

    r7655 r7673  
    286286                $obj_organization = CreateObject('phpgwapi.sector_search_ldap'); 
    287287                $organizations = $obj_organization->organization_search($GLOBALS['phpgw_info']['server']['ldap_context']); 
    288                  
    289                 for ($i=0; $i<count($organizations); ++$i) 
     288 
     289        $organizations_count = count($organizations); 
     290                for ($i=0; $i<$organizations_count; ++$i) 
    290291                { 
    291292                        $tmp_array[strtolower($organizations[$i])] = $organizations[$i];         
  • trunk/preferences/inc/class.uiaclprefs.inc.php

    r7655 r7673  
    112112                                        } 
    113113                                } 
    114                                  
    115                                 for($i=0;$i<count($to_remove);++$i) { 
     114 
     115                                $to_remove_count = count($to_remove); 
     116                                for($i=0;$i<$to_remove_count;++$i) { 
    116117                                         
    117118                                        if(!array_key_exists((int)$to_remove[$i],$keys_to_keep)) { 
  • trunk/preferences/inc/class.uicategories.inc.php

    r7655 r7673  
    8383                function cat_data($edata,$data) 
    8484                { 
    85                         for ($j=0;$j<count($edata);++$j) 
     85            $edata_count = count($edata); 
     86                        for ($j=0;$j<$edata_count;++$j) 
    8687                        { 
    8788                                $td_data .= '<td>' . $data[$edata[$j]] . '</td>' . "\n"; 
     
    169170                        if (is_array($edata)) 
    170171                        { 
    171                                 for($i=0;$i<count($edata);++$i) 
     172                $edata_count = count($edata); 
     173                                for($i=0;$i<$edata_count;++$i) 
    172174                                { 
    173175                                        $GLOBALS['phpgw']->template->set_var('th_data','<td bgcolor="' . $GLOBALS['phpgw_info']['theme']['th_bg'] . '">' . lang($edata[$i]) . '</td>'); 
     
    181183 
    182184// -------------------------- end header declaration -------------------------------------- 
    183  
    184                         for ($i=0;$i<count($cats);++$i) 
     185            $cats_count = count($cats); 
     186                        for ($i=0;$i<$cats_count;++$i) 
    185187                        { 
    186188                                $this->nextmatchs->template_alternate_row_color($GLOBALS['phpgw']->template); 
     
    375377                        { 
    376378                                $edata = explode(',',$extra); 
    377                                 for($i=0;$i<count($edata);++$i) 
     379                $edata_count = count($edata); 
     380                                for($i=0;$i<$edata_count;++$i) 
    378381                                { 
    379382                                        $GLOBALS['phpgw']->template->set_var('tr_color',$GLOBALS['phpgw']->nextmatchs->alternate_row_color()); 
     
    506509 
    507510                                $data = unserialize($cats[0]['data']); 
    508                                 for($i=0;$i<count($edata);++$i) 
     511                $edata_count = count($edata); 
     512                                for($i=0;$i<$edata_count;++$i) 
    509513                                { 
    510514                                        $GLOBALS['phpgw']->template->set_var('td_data','<input name="cat_data[' . $edata[$i] . ']" size="50" value="' . $data[$edata[$i]] . '">'); 
  • trunk/prototype/modules/catalog/interceptors/CatalogDBMapping.php

    r7655 r7673  
    2323 
    2424                if(count($params)>0 && isset($params[0]['id'])){ 
    25                         for($i=0; $i < count($params); ++$i){ 
     25            $params_count = count($params); 
     26                        for($i=0; $i < $params_count; ++$i){ 
    2627                                //Retorna o telefone e o e-mail padrao de um determinado contato 
    2728                                $sql = ' SELECT phpgw_cc_contact_conns.id_typeof_contact_connection as type, phpgw_cc_connections.connection_value as value ' 
  • trunk/prototype/services/ImapServiceAdapter.php

    r7655 r7673  
    171171                                        if( $filter[0] !== 'msgNumber' ) 
    172172                                        { 
    173                                         for( $i = 0; $i < count($filter); ++$i ) 
    174                                         { 
    175                                                 if( count( $filter[$i] ) === 4 ) 
    176                                                 $criteria['isExact'] = ( array_shift( $filter[$i] ) === 'AND' ); 
    177  
    178                                                 $criteria[ $filter[$i][0] ] = array( 'criteria' => $filter[$i][2], 'filter' => $filter[$i][1] ); 
    179                                         } 
    180  
    181                                         return $this->searchSieveRule($criteria); 
     173                        $filter_count = count($filter); 
     174                        for( $i = 0; $i < $filter_count; ++$i ) 
     175                        { 
     176                            if( count( $filter[$i] ) === 4 ) 
     177                            $criteria['isExact'] = ( array_shift( $filter[$i] ) === 'AND' ); 
     178 
     179                            $criteria[ $filter[$i][0] ] = array( 'criteria' => $filter[$i][2], 'filter' => $filter[$i][1] ); 
     180                        } 
     181 
     182                        return $this->searchSieveRule($criteria); 
    182183                                        } 
    183184 
     
    188189 
    189190                                        if( empty( $msgNumber ) ) 
    190                                         return( false ); 
     191                                            return( false ); 
    191192 
    192193                                        $result = $this->get_info_msgs( array( 'folder' => $folder_name,  
     
    213214 
    214215                                $response = array( "page" => $page, "total" => $total_pages, "records" => $count ); 
    215                                  
    216                                 for ($i=0; $i<count($result); ++$i) 
     216                                $result_count = count($result); 
     217                                for ($i=0; $i<$result_count; ++$i) 
    217218                                { 
    218219                                        $flags_enum = array('Unseen'=> 1,  'Answered'=> 1, 'Forwarded'=> 1, 'Flagged'=> 1, 'Recent'=> 1, 'Draft'=> 1 );  
  • trunk/prototype/services/PostgreSQL.php

    r7655 r7673  
    358358            $orderDesc = array( $orderDesc ); 
    359359        } 
    360  
    361         for($i=0; $i<count($order); ++$i){ 
     360        $order_count = count($order); 
     361        for($i=0; $i<$order_count; ++$i){ 
    362362            $order[$i] .= ($orderDesc[$i] === true) ? ' DESC' : ''; 
    363363        } 
  • trunk/reports/inc/class.fpdf.inc.php

    r7655 r7673  
    15891589                { 
    15901590                        $trns=''; 
    1591                         for($i=0;$i<count($info['trns']);++$i) 
     1591            $info_trns_count = count($info['trns']); 
     1592                        for($i=0;$i<$info_trns_count;++$i) 
    15921593                                $trns.=$info['trns'][$i].' '.$info['trns'][$i].' '; 
    15931594                        $this->_out('/Mask ['.$trns.']'); 
  • trunk/reports/inc/class.ldap_functions.inc.php

    r7655 r7673  
    136136                                $entry[0]['dn'] = strtolower($entry[0]['dn']); 
    137137                                $sector_dn_array = explode(",", $entry[0]['dn']); 
    138                                 for($i=1; $i<count($sector_dn_array); ++$i) 
     138                $sector_dn_array_count = count($sector_dn_array); 
     139                                for($i=1; $i<$sector_dn_array_count; ++$i) 
    139140                                        $sector_dn .= $sector_dn_array[$i] . ','; 
    140141                                //Retira ultimo pipe. 
     
    268269                                $entry[0]['dn'] = strtolower($entry[0]['dn']); 
    269270                                $sector_dn_array = explode(",", $entry[0]['dn']); 
    270                                 for($i=1; $i<count($sector_dn_array); ++$i) 
     271                $sector_dn_array_count = count($sector_dn_array); 
     272                                for($i=1; $i<$sector_dn_array_count; ++$i) 
    271273                                        $sector_dn .= $sector_dn_array[$i] . ','; 
    272274                                //Retira ultimo pipe. 
     
    366368                                $entry[0]['dn'] = strtolower($entry[0]['dn']); 
    367369                                $sector_dn_array = explode(",", $entry[0]['dn']); 
    368                                 for($i=1; $i<count($sector_dn_array); ++$i) 
     370                $sector_dn_array_count = count($sector_dn_array); 
     371                                for($i=1; $i<$sector_dn_array_count; ++$i) 
    369372                                        $sector_dn .= $sector_dn_array[$i] . ','; 
    370373                                //Retira ultimo pipe. 
  • trunk/reports/inc/class.uireports_fpdf.inc.php

    r7655 r7673  
    3838                //Calculate the height of the row 
    3939                $nb=0; 
    40                 for($i=0;$i< count($data);++$i) 
     40        $data_count = count($data); 
     41                for($i=0;$i< $data_count;++$i) 
    4142                $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i])); 
    4243                $h=5*$nb; 
     
    4445                $this->CheckPageBreak($h); 
    4546                //Draw the cells of the row 
    46                 for($i=0;$i< count($data);++$i) 
     47        $data_count = count($data); 
     48                for($i=0;$i< $data_count;++$i) 
    4749                { 
    4850                        $w=$this->widths[$i]; 
  • trunk/security/classes/funcoes_auxiliares.php

    r7655 r7673  
    242242                $n = 0; 
    243243                $b = 0; 
    244                 for($n = 0; $n < count($partes); ++$n) 
     244        $partes_count = count($partes); 
     245                for($n = 0; $n < $partes_count; ++$n) 
    245246                { 
    246247                        if($n==0) 
     
    14981499                if(count($partes)>1) 
    14991500                        { 
    1500                                 for($i=1;$i<count($partes);++$i) 
     1501                $partes_count = count($partes); 
     1502                                for($i=1;$i<$partes_count;++$i) 
    15011503                                        { 
    15021504                                                //O inicio da seq pode estar a 3 ou 2 digitos antes do inicio da oid .... depende do numero de bytes usados para  tamanho da seq. 
     
    15801582                $esta_oid = $oids[$oid]; 
    15811583                $p = 0; 
    1582                 for($i=1;$i < count($esta_oid) + 1; ++$i) 
     1584        $esta_oid_count = count($esta_oid); 
     1585                for($i=1;$i < $esta_oid_count + 1; ++$i) 
    15831586                        { 
    15841587                                if($esta_oid[$i][1] == 0) 
  • trunk/setup/ldapimport.php

    r7655 r7673  
    216216                                                // This is typically an exception to apps for run rights 
    217217                                                //  as a group member. 
    218                                                 for($a=0;$a<count($admins);++$a) 
     218                        $admins_count = count($admins); 
     219                                                for($a=0;$a<$admins_count;++$a) 
    219220                                                { 
    220221                                                        if($admins[$a] == $thisacctlid) 
  • trunk/workflow/inc/class.BrowserInfo.inc.php

    r7655 r7673  
    304304                $required = explode('.', $version); 
    305305                $current = explode('.', $this->getBrowserVersion()); 
    306                 for ($i = 0; $i < count($required); ++$i) 
     306        $required_count = count($required); 
     307                for ($i = 0; $i < $required_count; ++$i) 
    307308                { 
    308309                        $subRequired = (int) $required[$i]; 
  • trunk/workflow/inc/class.Paging.inc.php

    r7655 r7673  
    224224                        $links[] = $tmp; 
    225225                } 
    226  
    227                 for ($i = 0; $i < count($paginationLinks); ++$i) 
     226        $paginationLinks_count = count($paginationLinks); 
     227                for ($i = 0; $i < $paginationLinks_count; ++$i) 
    228228                { 
    229229                        $tmp = $paginationLinks[$i]; 
  • trunk/workflow/inc/class.bo_userinterface.inc.php

    r7655 r7673  
    846846 
    847847                $areas = $this->so->getAreaList($this->organizationInfo['organizacao_id']); 
    848                 for ($i = 0; $i < count($areas); ++$i) 
     848        $areas_count = count($areas); 
     849                for ($i = 0; $i < $areas_count; ++$i) 
    849850                { 
    850851                        $areas[$i]['children'] = false; 
  • trunk/workflow/inc/class.so_external_applications.inc.php

    r7655 r7673  
    148148 
    149149                $output = $result->GetArray(-1); 
    150                 for ($i = 0; $i < count($output); ++$i) 
     150        $output_count = count($output); 
     151                for ($i = 0; $i < $output_count; ++$i) 
    151152                        for ($j = 0; $j < $result->_numOfFields; ++$j) 
    152153                                unset($output[$i][$j]); 
     
    170171 
    171172                $output = $result->GetArray(-1); 
    172                 for ($i = 0; $i < count($output); ++$i) 
     173        $output_count = count($output); 
     174                for ($i = 0; $i < $output_count; ++$i) 
    173175                        for ($j = 0; $j < $result->_numOfFields; ++$j) 
    174176                                unset($output[$i][$j]); 
  • trunk/workflow/inc/class.so_orgchart.inc.php

    r7655 r7673  
    152152 
    153153                $output = $result->GetArray(-1); 
    154                 for ($i = 0; $i < count($output); ++$i) 
     154        $output_count = count($output); 
     155                for ($i = 0; $i < $output_count; ++$i) 
    155156                        for ($j = 0; $j < $result->_numOfFields; ++$j) 
    156157                                unset($output[$i][$j]); 
     
    385386 
    386387                $output = $result->GetArray(-1); 
    387                 for ($i = 0; $i < count($output); ++$i) 
     388        $output_count = count($output); 
     389                for ($i = 0; $i < $output_count; ++$i) 
    388390                        for ($j = 0; $j < $result->_numOfFields; ++$j) 
    389391                                unset($output[$i][$j]); 
     
    462464 
    463465                $output = $result->GetArray(-1); 
    464                 for ($i = 0; $i < count($output); ++$i) 
     466        $output_count = count($output); 
     467                for ($i = 0; $i < $output_count; ++$i) 
    465468                        for ($j = 0; $j < $result->_numOfFields; ++$j) 
    466469                                unset($output[$i][$j]); 
     
    541544 
    542545                $output = $result->GetArray(-1); 
    543                 for ($i = 0; $i < count($output); ++$i) 
     546        $output_count = count($output); 
     547                for ($i = 0; $i < $output_count; ++$i) 
    544548                        for ($j = 0; $j < $result->_numOfFields; ++$j) 
    545549                                unset($output[$i][$j]); 
     
    623627 
    624628                $output = $result->GetArray(-1); 
    625                 for ($i = 0; $i < count($output); ++$i){ 
     629        $output_count = count($output); 
     630                for ($i = 0; $i < $output_count; ++$i){ 
    626631                        for ($j = 0; $j < $result->_numOfFields; ++$j) 
    627632                                unset($output[$i][$j]); 
     
    714719                $cachedLDAP = Factory::newInstance('CachedLDAP'); 
    715720                $cachedLDAP->setOperationMode($cachedLDAP->OPERATION_MODE_LDAP_DATABASE); 
    716                 for ($i = 0; $i < count($output); ++$i) 
     721        $output_count = count($output); 
     722                for ($i = 0; $i < $output_count; ++$i) 
    717723                { 
    718724                        $output[$i]['funcionario_id_desc'] = ''; 
     
    790796 
    791797                $output = $result->GetArray(-1); 
    792                 for ($i = 0; $i < count($output); ++$i) 
     798        $output_count = count($output); 
     799                for ($i = 0; $i < $output_count; ++$i) 
    793800                { 
    794801                        for ($j = 0; $j < $result->_numOfFields; ++$j) 
     
    10031010 
    10041011                $output = $result->GetArray(-1); 
    1005                 for ($i = 0; $i < count($output); ++$i) 
     1012        $output_count = count($output); 
     1013                for ($i = 0; $i < $output_count; ++$i) 
    10061014                { 
    10071015                        for ($j = 0; $j < $result->_numOfFields; ++$j) 
     
    13841392 
    13851393                $output = $result->GetArray(-1); 
    1386                 for ($i = 0; $i < count($output); ++$i) 
     1394        $output_count = count($output); 
     1395                for ($i = 0; $i < $output_count; ++$i) 
    13871396                        for ($j = 0; $j < $result->_numOfFields; ++$j) 
    13881397                                unset($output[$i][$j]); 
     
    15861595 
    15871596                $output = $result->GetArray(-1); 
    1588                 for ($i = 0; $i < count($output); ++$i) { 
     1597        $output_count = count($output); 
     1598                for ($i = 0; $i < $output_count; ++$i) { 
    15891599                        for ($j = 0; $j < $result->_numOfFields; ++$j) 
    15901600                                unset($output[$i][$j]); 
  • trunk/workflow/inc/class.so_userinterface.inc.php

    r7655 r7673  
    123123 
    124124                        /* keep only associative elments and check if the user can access an intranet application */ 
    125                         for ($i = 0; $i < count($preOutput); ++$i) 
     125            $preOutput_count = count($preOutput); 
     126                        for ($i = 0; $i < $preOutput_count; ++$i) 
    126127                        { 
    127128                                if (($preOutput[$i]['intranet_only'] == '1') && (!$showIntranetApplications)) 
     
    169170 
    170171                $output = $result->GetArray(-1); 
    171                 for ($i = 0; $i < count($output); ++$i) 
     172        $output_count = count($output); 
     173                for ($i = 0; $i < $output_count; ++$i) 
    172174                        for ($j = 0; $j < $result->_numOfFields; ++$j) 
    173175                                unset($output[$i][$j]); 
     
    196198 
    197199                $output = $result->GetArray(-1); 
    198                 for ($i = 0; $i < count($output); ++$i) 
     200        $output_count = count($output); 
     201                for ($i = 0; $i < $output_count; ++$i) 
    199202                { 
    200203                        for ($j = 0; $j < $result->_numOfFields; ++$j) 
     
    218221 
    219222                $output = $result->GetArray(-1); 
    220                 for ($i = 0; $i < count($output); ++$i) 
     223        $output_count = count($output); 
     224                for ($i = 0; $i < $output_count; ++$i) 
    221225                        for ($j = 0; $j < $result->_numOfFields; ++$j) 
    222226                                unset($output[$i][$j]); 
     
    296300                $cachedLDAP->setOperationMode($cachedLDAP->OPERATION_MODE_NORMAL); 
    297301                $categoriesCount = array(); 
    298                 for ($i = 0; $i < count($employees); ++$i) 
     302        $employees_count = count($employees); 
     303                for ($i = 0; $i < $employees_count; ++$i) 
    299304                { 
    300305                        /* remove numeric fields */ 
     
    396401                $cachedLDAP = Factory::newInstance('CachedLDAP'); 
    397402                $cachedLDAP->setOperationMode($cachedLDAP->OPERATION_MODE_NORMAL); 
    398                 for ($i = 0; $i < count($employees); ++$i) 
     403        $employees_count = count($employees); 
     404                for ($i = 0; $i < $employees_count; ++$i) 
    399405                { 
    400406                        /* remove numeric fields */ 
     
    434440 
    435441                if (count($searchTermExploded) > 0){ 
    436                         for ($i=1; $i<count($searchTermExploded); ++$i) { 
     442            $searchTermExploded_count = count($searchTermExploded); 
     443                        for ($i=1; $i<$searchTermExploded_count; ++$i) { 
    437444                                if (strlen($searchTermExploded[$i]) > 2) { 
    438445                                        $fullSearch = true; 
     
    481488 
    482489                /* filling return array with employee's information */ 
    483                 for ($i = 0; $i < count($result); ++$i) { 
     490        $result_count = count($result); 
     491                for ($i = 0; $i < $result_count; ++$i) { 
    484492                        $employees []= array( 
    485493                                        'area'                          => $result[$i]['area'], 
     
    536544                /* creating the ldap query */ 
    537545                $ldap_query = '(&(|'; 
    538                 for ($i = 0; $i < count($result); ++$i) { 
     546        $result_count = count($result); 
     547                for ($i = 0; $i < $result_count; ++$i) { 
    539548                        $ldap_query .= '(uidNumber=' . $result[$i]['funcionario_id'] . ')'; 
    540549                } 
     
    556565                /* filling return array with employee's information */ 
    557566                $employees = array(); 
    558                 for ($i = 0; $i < count($result); ++$i) { 
     567        $result_count = count($result); 
     568                for ($i = 0; $i < $result_count; ++$i) { 
    559569 
    560570                        $employee = array(); 
     
    642652 
    643653                /* filling return array with employee's information */ 
    644                 for ($i = 0; $i < count($result); ++$i) { 
     654        $result_count = count($result); 
     655                for ($i = 0; $i < $result_count; ++$i) { 
    645656                        $employees []= array( 
    646657                                        'area'                          => $result[$i]['area'], 
     
    707718 
    708719                $output = $result->GetArray(-1); 
    709                 for ($i = 0; $i < count($output); ++$i) 
     720        $output_count = count($output); 
     721                for ($i = 0; $i < $output_count; ++$i) 
    710722                        for ($j = 0; $j < $result->_numOfFields; ++$j) 
    711723                                unset($output[$i][$j]); 
     
    728740 
    729741                $output = $result->GetArray(-1); 
    730                 for ( $i = 0; $i < count($output); ++$i ) 
     742        $output_count = count($output); 
     743                for ( $i = 0; $i < $output_count; ++$i ) 
    731744                { 
    732745                        for ($j = 0; $j < $result->_numOfFields; ++$j) 
     
    759772 
    760773                $output = $result->GetArray( -1 ); 
    761                 for ( $i = 0; $i < count($output); ++$i ) 
     774        $output_count = count($output); 
     775                for ( $i = 0; $i < $output_count; ++$i ) 
    762776                        for ($j = 0; $j < $result->_numOfFields; ++$j) 
    763777                                unset($output[$i][$j]); 
     
    795809 
    796810                $categoriesCount = array( ); 
    797                 for ( $i = 0; $i < count( $employees ); ++$i ) 
     811        $employees_count = count( $employees ); 
     812                for ( $i = 0; $i < $employees_count; ++$i ) 
    798813                { 
    799814                        // remove numeric fields 
     
    867882 
    868883                $categoriesCount = array( ); 
    869                 for ( $i = 0; $i < count( $employees ); ++$i ) 
     884        $employees_count = count( $employees ); 
     885                for ( $i = 0; $i < $employees_count; ++$i ) 
    870886                { 
    871887                        // remove numeric fields 
     
    893909 
    894910                // count the number of employees in each category 
    895                 for ( $i = 0; $i < count( $employees ); ++$i ) 
     911        $employees_count = count( $employees ); 
     912                for ( $i = 0; $i < $employees_count; ++$i ) 
    896913                { 
    897914                        $categoryID = $employees[ $i ][ 'funcionario_categoria_id' ]; 
  • trunk/workflow/inc/class.ui_orgchart.inc.php

    r7655 r7673  
    152152 
    153153                        $ldap = &Factory::getInstance('WorkflowLDAP'); 
    154                         for ($i = 0; $i < count($output); ++$i) 
     154            $output_count = count($output); 
     155                        for ($i = 0; $i < $output_count; ++$i) 
    155156                        { 
    156157                                for ($j = 0; $j < $result->_numOfFields; ++$j) 
     
    162163                                        $supervisorArray = explode(' ', $supervisor); 
    163164                                        $supervisorName = ''; 
    164                                         for ($j = 0; $j < count($supervisorArray); ++$j) 
     165                    $supervisorArray_count = count($supervisorArray); 
     166                                        for ($j = 0; $j < $supervisorArray_count; ++$j) 
    165167                                                $supervisorName .= (($j == 0) || ($j == count($supervisorArray) - 1)) ? $supervisorArray[$j] . ' ' : $supervisorArray[$j][0] . '. '; 
    166168                                        $supervisorName = trim(str_replace("Junior", "Jr", $supervisorName)); 
  • trunk/workflow/inc/class.utils.security.php

    r7655 r7673  
    6868        function SecurityUtils($tagsArray = array(), $attrArray = array(), $tagsMethod = 0, $attrMethod = 0, $xssAuto = 1) { 
    6969                // make sure user defined arrays are in lowercase 
    70                 for ($i = 0; $i < count($tagsArray); ++$i) $tagsArray[$i] = strtolower($tagsArray[$i]); 
    71                 for ($i = 0; $i < count($attrArray); ++$i) $attrArray[$i] = strtolower($attrArray[$i]); 
     70        $tagsArray_count = count($tagsArray); 
     71                for ($i = 0; $i < $tagsArray_count; ++$i) 
     72            $tagsArray[$i] = strtolower($tagsArray[$i]); 
     73        $attrArray_count = count($attrArray); 
     74                for ($i = 0; $i < $attrArray_count; ++$i) 
     75            $attrArray[$i] = strtolower($attrArray[$i]); 
    7276                // assign to member vars 
    7377                $this->tagsArray = (array) $tagsArray; 
     
    135139                $newSet = array(); 
    136140                // process attributes 
    137                 for ($i = 0; $i <count($attrSet); ++$i) { 
     141        $attrSet_count = count($attrSet); 
     142                for ($i = 0; $i < $attrSet_count; ++$i) { 
    138143                        // skip blank spaces in tag 
    139144                        if (!$attrSet[$i]) continue; 
Note: See TracChangeset for help on using the changeset viewer.