Changeset 7655 for trunk/calendar


Ignore:
Timestamp:
12/14/12 14:30:35 (11 years ago)
Author:
douglasz
Message:

Ticket #3236 - Melhorias de performance no codigo do Expresso.

Location:
trunk/calendar
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/calendar/csv_import.php

    r6057 r7655  
    485485                                        { 
    486486                                                $calendar->add_attribute('participants',$status,$part); 
    487                                                 $participants++; 
     487                                                ++$participants; 
    488488                                        } 
    489489                                } 
  • trunk/calendar/egroupware.org/accept_holiday.php

    r2 r7655  
    2525                        $c_holidays = count($_POST['name']); 
    2626                        $fp = fopen($file,'w'); 
    27                         for($i=0;$i<$c_holidays;$i++) 
     27                        for($i=0;$i<$c_holidays;++$i) 
    2828                        { 
    2929                                fwrite($fp,$_POST['locale']."\t".$_POST['name'][$i]."\t".$_POST['day'][$i]."\t".$_POST['month'][$i]."\t".$_POST['occurence'][$i]."\t".$_POST['dow'][$i]."\t".$_POST['observance'][$i]."\n"); 
  • trunk/calendar/inc/class.bocalendar.inc.php

    r7436 r7655  
    912912                                $endtime += $offset*$multi; 
    913913                                $starttime <= $enddate; 
    914                                 $i++, 
     914                                ++$i, 
    915915                                $i = ($i < count($dowOffsets))?$i:0, 
    916916                                $multi = $dowOffsets[$i], 
     
    12521252                                        $minparts = min($l_participants); 
    12531253                                        $part = Array(); 
    1254                                         for($i=0;$i<count($parts);$i++) 
     1254                                        for($i=0;$i<count($parts);++$i) 
    12551255                                        { 
    12561256                                                if (($accept_type = substr($parts[$i],-1,1)) == '0' || (int)$accept_type > 0) 
     
    21372137                        { 
    21382138                                $exceptions = explode(',',$exception_str); 
    2139                                 for($exception_count=0;$exception_count<count($exceptions);$exception_count++) 
     2139                                for($exception_count=0;$exception_count<count($exceptions);++$exception_count) 
    21402140                                { 
    21412141                                        $exception[] = (int)$exceptions[$exception_count]; 
     
    21962196                                } 
    21972197 
    2198                                 for($i=0;$i<count($this->cached_events[$date]);$i++) 
     2198                                for($i=0;$i<count($this->cached_events[$date]);++$i) 
    21992199                                { 
    22002200                                        if($this->cached_events[$date][$i]['id'] == $event['id'] || $this->cached_events[$date][$i]['reference'] == $event['id']) 
     
    22562256                        $repeated = $this->repeating_events; 
    22572257                        $r_events = count($repeated); 
    2258                         for ($i=0;$i<$r_events;$i++) 
     2258                        for ($i=0;$i<$r_events;++$i) 
    22592259                        { 
    22602260                                $rep_events = $this->repeating_events[$i]; 
     
    24602460                                        { 
    24612461                                                $emonth = 1; 
    2462                                                 $eyear++; 
     2462                                                ++$eyear; 
    24632463                                        } 
    24642464                                } 
     
    25102510                        if($c_cached_ids) 
    25112511                        { 
    2512                                 for($i=0;$i<$c_cached_ids;$i++) 
     2512                                for($i=0;$i<$c_cached_ids;++$i) 
    25132513                                { 
    25142514                                        $event = $this->so->read_entry($cached_event_ids[$i]); 
     
    25252525                                                $start['month'] = (int)(substr($startdate,4,2)); 
    25262526                                                $start['mday'] = (int)(substr($startdate,6,2)); 
    2527                                                 for($j=$startdate,$k=0;$j<=$enddate;$k++,$j=(int)(date('Ymd',mktime(0,0,0,$start['month'],$start['mday'] + $k,$start['year'])))) 
     2527                                                for($j=$startdate,$k=0;$j<=$enddate;++$k,$j=(int)(date('Ymd',mktime(0,0,0,$start['month'],$start['mday'] + $k,$start['year'])))) 
    25282528                                                { 
    25292529                                                        $c_evt_day = count($this->cached_events[$j]) - 1; 
     
    25562556                        if($c_cached_ids_repeating) 
    25572557                        { 
    2558                                 for($i=0;$i<$c_cached_ids_repeating;$i++) 
     2558                                for($i=0;$i<$c_cached_ids_repeating;++$i) 
    25592559                                { 
    25602560                                        $this->repeating_events[$i] = $this->so->read_entry($cached_event_ids_repeating[$i]); 
     
    25752575                                        { 
    25762576                                                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++) 
     2577                                                for($i=0;$i<count($this->cached_events[$search_date]);++$i) 
    25782578                                                { 
    25792579                                                        echo '<!-- Date: '.$search_date.' ['.$i.'] = '.$this->cached_events[$search_date][$i]['id'].' -->'."\n"; 
     
    25832583                        } 
    25842584                        $retval = Array(); 
    2585                         for($j=date('Ymd',mktime(0,0,0,$smonth,$sday,$syear)),$k=0;$j<=date('Ymd',mktime(0,0,0,$emonth,$eday,$eyear));$k++,$j=date('Ymd',mktime(0,0,0,$smonth,$sday + $k,$syear))) 
     2585                        for($j=date('Ymd',mktime(0,0,0,$smonth,$sday,$syear)),$k=0;$j<=date('Ymd',mktime(0,0,0,$emonth,$eday,$eyear));++$k,$j=date('Ymd',mktime(0,0,0,$smonth,$sday + $k,$syear))) 
    25862586                        { 
    25872587                                if(is_array($this->cached_events[$j])) 
     
    27652765                function prepare_matrix($interval,$increment,$part,$fulldate) 
    27662766                { 
    2767                         for($h=0;$h<24;$h++) 
    2768                         { 
    2769                                 for($m=0;$m<$interval;$m++) 
     2767                        for($h=0;$h<24;++$h) 
     2768                        { 
     2769                                for($m=0;$m<$interval;++$m) 
    27702770                                { 
    27712771                                        $index = (($h * 10000) + (($m * $increment) * 100)); 
     
    27852785                                $starttemp = $this->splittime("$start",False); 
    27862786                                $subminute = 0; 
    2787                                 for($m=0;$m<$interval;$m++) 
     2787                                for($m=0;$m<$interval;++$m) 
    27882788                                { 
    27892789                                        $minutes = $increment * $m; 
     
    27972797                                $endtemp = $this->splittime("$end",False); 
    27982798                                $addminute = 0; 
    2799                                 for($m=0;$m<$interval;$m++) 
     2799                                for($m=0;$m<$interval;++$m) 
    28002800                                { 
    28012801                                        $minutes = ($increment * $m); 
     
    28092809                                $endtemp = $this->splittime("$end",False); 
    28102810 
    2811                                 for($h=$starttemp['hour'];$h<=$endtemp['hour'];$h++) 
     2811                                for($h=$starttemp['hour'];$h<=$endtemp['hour'];++$h) 
    28122812                                { 
    28132813                                        $startminute = 0; 
     
    28252825                                        $time_display = $GLOBALS['phpgw']->common->show_date($eventstart['raw'],$this->users_timeformat).'-'.$GLOBALS['phpgw']->common->show_date($eventend['raw'],$this->users_timeformat); 
    28262826                                        $time_description = '('.$time_display.') '.$this->get_short_field($event,$private,'title').$this->display_status($event['participants'][$part]); 
    2827                                         for($m=$startminute;$m<$endminute;$m++) 
     2827                                        for($m=$startminute;$m<$endminute;++$m) 
    28282828                                        { 
    28292829                                                $index = ($hour + (($m * $increment) * 100)); 
     
    28662866 
    28672867                        //verifica se todos os participantes rejeitaram o evento 
    2868                         for($i = 0; $i < count($sts); $i++ ){  
     2868                        for($i = 0; $i < count($sts); ++$i ){ 
    28692869                                if( $sts[i] === "R") 
    28702870                                        unset( $sts[i] ); 
     
    30653065                    $last_space = false; 
    30663066 
    3067                     for($i=0, $count=0; $i < $str_width; $i++, $count++) 
     3067                    for($i=0, $count=0; $i < $str_width; ++$i, ++$count) 
    30683068                    { 
    30693069                        // If we're at a break 
     
    41994199                { 
    42004200                        $already_moved = Array(); 
    4201                         for($v=$firstday;$v<=$lastday;$v++) 
     4201                        for($v=$firstday;$v<=$lastday;++$v) 
    42024202                        { 
    42034203                                if (!$this->cached_events[$v]) 
     
    44364436                        { 
    44374437                                $cal_grps = ''; 
    4438                                 for($i=0;$i<count($event['groups']);$i++) 
     4438                                for($i=0;$i<count($event['groups']);++$i) 
    44394439                                { 
    44404440                                        if($GLOBALS['phpgw']->accounts->exists($event['groups'][$i])) 
  • trunk/calendar/inc/class.boholiday.inc.php

    r5132 r7655  
    145145                                $c_holidays = count($_POST['name']); 
    146146                                $fp = fopen($file,'w'); 
    147                                 for($i=0;$i<$c_holidays;$i++) 
     147                                for($i=0;$i<$c_holidays;++$i) 
    148148                                { 
    149149                                        fwrite($fp,$this->locales[0]."\t".$_POST['name'][$i]."\t".$_POST['day'][$i]."\t".$_POST['month'][$i]."\t".$_POST['occurence'][$i]."\t".$_POST['dow'][$i]."\t".$_POST['observance'][$i]."\n"); 
     
    262262                                } 
    263263                                $c_lines = count($lines); 
    264                                 for($i=0;$i<$c_lines;$i++) 
     264                                for($i=0;$i<$c_lines;++$i) 
    265265                                { 
    266266//                                      echo 'Line #'.$i.' : '.$lines[$i]."<br>\n"; 
     
    346346                { 
    347347                        $c_holidays = count($holidays); 
    348                         for($outer_loop=0;$outer_loop<($c_holidays - 1);$outer_loop++) 
    349                         { 
    350                                 for($inner_loop=$outer_loop;$inner_loop<$c_holidays;$inner_loop++) 
     348                        for($outer_loop=0;$outer_loop<($c_holidays - 1);++$outer_loop) 
     349                        { 
     350                                for($inner_loop=$outer_loop;$inner_loop<$c_holidays;++$inner_loop) 
    351351                                { 
    352352                                        if($holidays[$outer_loop]['date'] > $holidays[$inner_loop]['date']) 
     
    364364                { 
    365365                        $new_holidays = Array(); 
    366                         for($i=0;$i<count($holidays);$i++) 
     366                        for($i=0;$i<count($holidays);++$i) 
    367367                        { 
    368368//      echo "Setting Holidays Date : ".date('Ymd',$holidays[$i]['date'])."<br>\n"; 
     
    386386 
    387387                        $temp_locale = $GLOBALS['phpgw_info']['user']['preferences']['common']['country']; 
    388                         for($i=0;$i<count($holidays);$i++) 
     388                        for($i=0;$i<count($holidays);++$i) 
    389389                        { 
    390390                                $c = $i; 
  • trunk/calendar/inc/class.boicalendar.inc.php

    r6057 r7655  
    14341434                        //$this->debug('parse_parameters array return_value: '._debug_array($return_value,False)); 
    14351435 
    1436                 for ($i = 0; $i < count($return_value); $i++) { 
     1436                for ($i = 0; $i < count($return_value); ++$i) { 
    14371437                                $name = strtolower($return_value[$i]['param']); 
    14381438                                $value = $this->strip_quotes($return_value[$i]['value']); 
     
    15911591                        if (!empty ($event['x_type'])) { 
    15921592                                        $c_x_type = count($event['x_type']); 
    1593                                 for ($j = 0; $j < $c_x_type; $j++) { 
     1593                                for ($j = 0; $j < $c_x_type; ++$j) { 
    15941594                                        $str .= ';' . $this->build_xtype($event['x_type'][$j], '='); 
    15951595                                        } 
     
    16371637                if (!empty ($event['x_type'])) { 
    16381638                                $c_x_type = count($event['x_type']); 
    1639                         for ($j = 0; $j < $c_x_type; $j++) { 
     1639                        for ($j = 0; $j < $c_x_type; ++$j) { 
    16401640                                $str .= ';' . $this->build_xtype($event['x_type'][$j], '='); 
    16411641                                } 
     
    16611661                                        if (!empty ($event[$value])) { 
    16621662                                                if ($multiples && $value != 'exdate') { 
    1663                                                         for ($i = 0; $i < count($event[$value]); $i++) { 
     1663                                                        for ($i = 0; $i < count($event[$value]); ++$i) { 
    16641664                                                                $str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . $this->build_parameters($event[$value][$i], $value)); 
    16651665                                                                } 
     
    16741674                                case 'uri' : 
    16751675                                        if (!empty ($event[$value])) { 
    1676                                                 for ($i = 0; $i < count($event[$value]); $i++) { 
     1676                                                for ($i = 0; $i < count($event[$value]); ++$i) { 
    16771677                                                        $str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . $this->build_parameters($event[$value][$i], $to_text)); 
    16781678                                                        } 
     
    16821682                                        if (!empty ($event[$value])) { 
    16831683                                                if ($multiples) { 
    1684                                                         for ($i = 0; $i < count($event[$value]); $i++) { 
     1684                                                        for ($i = 0; $i < count($event[$value]); ++$i) { 
    16851685                                                                $str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . $this->build_parameters($event[$value][$i], $value)); 
    16861686                                                        } 
     
    17121712                                                if (@ $this->parameter[$key]['type'] != 'function') { 
    17131713                                                        if ($multiples && count($event[$value]) > 1) { 
    1714                                                                 for ($i = 0; $i < count($event[$value]); $i++) { 
     1714                                                                for ($i = 0; $i < count($event[$value]); ++$i) { 
    17151715                                                                        $str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . $this->build_parameters($event[$value][$i], $value)); 
    17161716                                                                } 
     
    17211721                                                                $function = $this->parameter[$value]['function']; 
    17221722                                                        if ($multiples) { 
    1723                                                                 for ($i = 0; $i < count($event[$value]); $i++) { 
     1723                                                                for ($i = 0; $i < count($event[$value]); ++$i) { 
    17241724                                                                        $str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . ':' . $this-> $function ($event[$value][$i])); 
    17251725                                                                } 
     
    17321732                                case 'cal-address' : 
    17331733                                        if (is_array($event[$value][0])) { 
    1734                                                 for ($j = 0; $j < count($event[$value]); $j++) { 
     1734                                                for ($j = 0; $j < count($event[$value]); ++$j) { 
    17351735                                                        $temp_output = $this->build_parameters($event[$value][$j], $value); 
    17361736                                                        if ($temp_output) { 
     
    17481748                        } 
    17491749                if (!empty ($event['x_type'])) { 
    1750                         for ($i = 0; $i < count($event['x_type']); $i++) { 
     1750                        for ($i = 0; $i < count($event['x_type']); ++$i) { 
    17511751                                $str .= $this->build_xtype($event['x_type'][$i], ':'); 
    17521752                                } 
     
    17551755                if ($ical_item == 'vtimezone') { 
    17561756                        if ($event['tzdata']) { 
    1757                                 for ($k = 0; $k < count($event['tzdata']); $k++) { 
     1757                                for ($k = 0; $k < count($event['tzdata']); ++$k) { 
    17581758                                        $str .= 'BEGIN:' . strtoupper($event['tzdata'][$k]['type']) . "\r\n"; 
    17591759                                        $str .= $this->build_card_internals(strtolower($event['tzdata'][$k]['type']), $event['tzdata'][$k]); 
     
    17631763                        } 
    17641764                elseif ($event['alarm']) { 
    1765                         for ($k = 0; $k < count($event['alarm']); $k++) { 
     1765                        for ($k = 0; $k < count($event['alarm']); ++$k) { 
    17661766                                $str .= 'BEGIN:VALARM' . "\r\n"; 
    17671767                                $str .= $this->build_card_internals('valarm', $event['alarm'][$k]); 
     
    26322632                                        $attendee_count = count($ical['attendee']); 
    26332633 
    2634                                 for ($j = 0; $j < $attendee_count; $j++) { 
     2634                                for ($j = 0; $j < $attendee_count; ++$j) { 
    26352635                                        if ($this->is_owner($ical['attendee'][$j])) { 
    26362636                                                $so_event->add_attribute('participants', $this->switch_to_phpgw_status($ical['attendee'][$j]['partstat']), (int) $GLOBALS['phpgw_info']['user']['account_id']); 
     
    27882788 
    27892789        $c_events = count($ical['event']); 
    2790         for ($i = 0; $i < $c_events; $i++) { 
     2790        for ($i = 0; $i < $c_events; ++$i) { 
    27912791                $ex_participants = new exParticipants(); 
    27922792 
     
    28322832                                                $c_attendees = count($ical['event'][$i]['attendee']); 
    28332833                                                $all_attendees = ''; 
    2834                         for ($a = 0; $a < $c_attendees; $a++) { 
     2834                        for ($a = 0; $a < $c_attendees; ++$a) { 
    28352835                                $cname = '"' . $ical['event'][$i]['attendee'][$a]['cn'] . '"'; 
    28362836                                                        $email = $ical['event'][$i]['attendee'][$a]['mailto']['user']; 
  • trunk/calendar/inc/class.calendar_holiday.inc.php

    r2 r7655  
    137137                        } 
    138138                        $c_lines = count($lines); 
    139                         for($i=0;$i<$c_lines;$i++) 
     139                        for($i=0;$i<$c_lines;++$i) 
    140140                        { 
    141141        //                      echo 'Line #'.$i.' : '.$lines[$i]."<br>\n"; 
     
    204204                                        $i = $c; 
    205205                                } 
    206                                 $i++; 
     206                                ++$i; 
    207207                        } 
    208208                        $this->holidays = $this->sort_by_date($this->holidays); 
     
    217217                        while($this->db->next_record()) 
    218218                        { 
    219                                 $i++; 
     219                                ++$i; 
    220220                                $holidays[$i]['locale'] = $this->db->f('locale'); 
    221221                                $holidays[$i]['name']   = $GLOBALS['phpgw']->strip_html($this->db->f('name')); 
     
    254254                { 
    255255                        $c_holidays = count($holidays); 
    256                         for($outer_loop=0;$outer_loop<($c_holidays - 1);$outer_loop++) 
     256                        for($outer_loop=0;$outer_loop<($c_holidays - 1);++$outer_loop) 
    257257                        { 
    258258                                $outer_date = $holidays[$outer_loop]['date']; 
    259                                 for($inner_loop=$outer_loop;$inner_loop<$c_holidays;$inner_loop++) 
     259                                for($inner_loop=$outer_loop;$inner_loop<$c_holidays;++$inner_loop) 
    260260                                { 
    261261                                        $inner_date = $holidays[$inner_loop]['date']; 
     
    279279 
    280280                        $c_holidays = count($this->holidays); 
    281                         for($i=0;$i<$c_holidays;$i++) 
     281                        for($i=0;$i<$c_holidays;++$i) 
    282282                        { 
    283283                                if($this->holidays[$i]['date'] > $date) 
  • trunk/calendar/inc/class.ex_participants.inc.php

    r5143 r7655  
    106106                $exp .= '('.$this->lang['NO ANSWER'].')'; 
    107107 
    108             $count++; 
     108            ++$count; 
    109109            $return .= $exp; 
    110110        } 
  • trunk/calendar/inc/class.holidaycalc_US.inc.php

    r2 r7655  
    5353                                        if($dow == 0) 
    5454                                        { 
    55                                                 $i++; 
     55                                                ++$i; 
    5656                                                $holidays[$i]['locale'] = $holiday['locale']; 
    5757                                                $holidays[$i]['name'] = $holiday['name'].' (Observed)'; 
     
    6565                                        elseif($dow == 6) 
    6666                                        { 
    67                                                 $i++; 
     67                                                ++$i; 
    6868                                                $holidays[$i]['locale'] = $holiday['locale']; 
    6969                                                $holidays[$i]['name'] = $holiday['name'].' (Observed)'; 
  • trunk/calendar/inc/class.socalendar.inc.php

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

    r7552 r7655  
    185185                                                        { 
    186186                                                                $id = 'cal:'.(int)$cal_id.':'.$n; 
    187                                                                 $n++; 
     187                                                                ++$n; 
    188188                                                                 
    189189                                                                $alarm['cal_id'] = $cal_id;             // we need the back-reference 
     
    376376 
    377377                                                                                $id = 'cal:'.(int)$cal_id.':'.$n; 
    378                                                                                 $n++; 
     378                                                                                ++$n; 
    379379 
    380380                                                                                $alarm['cal_id'] = $cal_id;             // we need the back-reference 
     
    402402                                                                        } 
    403403                                                                } 
    404                                                                 $y++; 
     404                                                                ++$y; 
    405405                                                        } 
    406406                                                } 
     
    426426 
    427427                                                                $id = 'cal:'.(int)$cal_id.':'.$n; 
    428                                                                 $n++; 
     428                                                                ++$n; 
    429429 
    430430                                                                $alarm['cal_id'] = $cal_id;             // we need the back-reference 
     
    467467 
    468468                                                                $id = 'cal:'.(int)$cal_id.':'.$n; 
    469                                                                 $n++; 
     469                                                                ++$n; 
    470470 
    471471                                                                $alarm['cal_id'] = $cal_id;             // we need the back-reference 
     
    597597                                { 
    598598                                        $groups = explode(',',$this->stream->f('groups')); 
    599                                         for($j=1;$j<count($groups) - 1;$j++) 
     599                                        for($j=1;$j<count($groups) - 1;++$j) 
    600600                                        { 
    601601                                                $this->add_attribute('groups',$groups[$j],$j-1); 
  • trunk/calendar/inc/class.uicalendar.inc.php

    r6057 r7655  
    282282                        if(!$mini_cal_tpl->get_var('daynames')) 
    283283                        { 
    284                                 for($i=0;$i<7;$i++) 
     284                                for($i=0;$i<7;++$i) 
    285285                                { 
    286286                                        $var = Array( 
     
    328328                                        ); 
    329329                                } 
    330                                 for($l=0;$l<count($var);$l++) 
     330                                for($l=0;$l<count($var);++$l) 
    331331                                { 
    332332                                        $this->output_template_array($mini_cal_tpl,'monthweek_day','mini_day',$var[$l]); 
     
    742742                        $p->set_var($var); 
    743743 
    744                         for($i=1;$i<=12;$i++) 
     744                        for($i=1;$i<=12;++$i) 
    745745                        { 
    746746                                if(($i % 3) == 1) 
     
    13311331                        $str = ''; 
    13321332 
    1333                         for($i=0;$i<count($event['recur_exception']);$i++) 
     1333                        for($i=0;$i<count($event['recur_exception']);++$i) 
    13341334                        { 
    13351335                                $str .= '    <option value="'.$i.'">'.$GLOBALS['phpgw']->common->show_date($event['recur_exception'][$i]).'</option>'."\n"; 
     
    14571457                                // Add participants 
    14581458                                $participants = explode(";", $GLOBALS['phpgw']->session->appsession("participants") ); 
    1459                                 for($_f_part=0; $_f_part<count($participants); $_f_part++) 
     1459                                for($_f_part=0; $_f_part<count($participants); ++$_f_part) 
    14601460                                { 
    14611461                                        $this->bo->add_attribute('participants','A',$participants[$_f_part]); 
     
    18001800                                . '<tr><td height="1" colspan="'.((11 * $interval) + 1).'" bgcolor="black"><img src="'.$pix.'"></td></tr>' 
    18011801                                . '<tr><td width="15%"><font color="'.$this->theme['bg_text'].'" face="'.$this->theme['font'].'" size="-2">'.lang('Participant').'</font></td>'; 
    1802                         for($i=8;$i<19;$i++) 
    1803                         { 
    1804                                 for($j=0;$j<$interval;$j++) 
     1802                        for($i=8;$i<19;++$i) 
     1803                        { 
     1804                                for($j=0;$j<$interval;++$j) 
    18051805                                { 
    18061806                                        $k = ($j == 0 ? sprintf('%02d',$i).'<br>':'').sprintf('%02d',$j*$increment); 
     
    18541854                                if(!$this->bo->cached_events[$date['full']]) 
    18551855                                { 
    1856                                         for($j=8;$j<19;$j++) 
     1856                                        for($j=8;$j<19;++$j) 
    18571857                                        { 
    1858                                                 for($k=0;$k<$interval;$k++) 
     1858                                                for($k=0;$k<$interval;++$k) 
    18591859                                                { 
    18601860//                                                      $helper_name = $k* 
     
    18671867                                { 
    18681868                                        $time_slice = $this->bo->prepare_matrix($interval,$increment,$part,$date['full']); 
    1869                                         for($h=8;$h<19;$h++) 
     1869                                        for($h=8;$h<19;++$h) 
    18701870                                        { 
    18711871                                                $hour = $h * 10000; 
    1872                                                 for($m=0;$m<$interval;$m++) 
     1872                                                for($m=0;$m<$interval;++$m) 
    18731873                                                { 
    18741874                                                        $index = ($hour + (($m * $increment) * 100)); 
     
    22672267                        $y = $this->bo->year; 
    22682268                        $this->bo->read_holidays($y); 
    2269                         for ($i=1; $i<=$this->bo->num_months; $i++,$m++) 
     2269                        for ($i=1; $i<=$this->bo->num_months; ++$i,++$m) 
    22702270                        { 
    22712271                                if ($m == 13) 
     
    22962296                                        ); 
    22972297                                } 
    2298                                 for ($d=1; $d<=$days; $d++) 
     2298                                for ($d=1; $d<=$days; ++$d) 
    22992299                                { 
    23002300                                        $dayname = substr(lang(date('D',mktime(0,0,0,$m,$d,$y))),0,2); 
     
    26012601                                if ($end_cell == $start_cell && $end_cell < $last_cell) 
    26022602                                { 
    2603                                         $end_cell++;    // min. width 1 interval 
     2603                                        ++$end_cell;    // min. width 1 interval 
    26042604                                } 
    26052605                        } 
     
    27362736                        // process all events within observed interval 
    27372737                        // 
    2738                         for($v=$this->planner_firstday;$v<=$this->planner_lastday;$v++) 
     2738                        for($v=$this->planner_firstday;$v<=$this->planner_lastday;++$v) 
    27392739                        { 
    27402740                                $daily = $this->bo->cached_events[$v]; 
     
    28092809                        $accounts = $GLOBALS['phpgw']->acl->get_ids_for_location('run',1,'calendar'); 
    28102810                        $users = Array(); 
    2811                         for($i=0;$i<count($accounts);$i++) 
     2811                        for($i=0;$i<count($accounts);++$i) 
    28122812                        { 
    28132813                                $user = $accounts[$i]; 
     
    28202820                                                if($group_members != False) 
    28212821                                                { 
    2822                                                         for($j=0;$j<count($group_members);$j++) 
     2822                                                        for($j=0;$j<count($group_members);++$j) 
    28232823                                                        { 
    28242824                                                                if(!isset($users[$group_members[$j]])) 
     
    28612861                        ); 
    28622862 
    2863                         for($i=0;$i<count($var);$i++) 
     2863                        for($i=0;$i<count($var);++$i) 
    28642864                        { 
    28652865                                $this->output_template_array($p,'rows','list',$var[$i]); 
     
    31553155                        if($this->bo->check_perms(PHPGW_ACL_PRIVATE) == True) 
    31563156                        { 
    3157                                 $cols++; 
     3157                                ++$cols; 
    31583158                        } 
    31593159 
     
    32293229                        /* Bloco adicionado para receber o dia a partir do qual a versao para impressao sera gerada */ 
    32303230                        $str_ini = ''; 
    3231                         for ($i = 1; $i <= ($GLOBALS['phpgw']->datetime->days_in_month($m, $y)); $i++) 
     3231                        for ($i = 1; $i <= ($GLOBALS['phpgw']->datetime->days_in_month($m, $y)); ++$i) 
    32323232                        { 
    32333233                                $str_ini .= '<option value="'.$i.'"'.($i == $day?' selected':'').'>'.$i.'</option>'."\n"; 
    32343234                        } 
    32353235                        $str_qtd = '<option value="'.''.'"'.($i == $_POST['qtd_dias']?' selected':'').'>'.''.'</option>'."\n"; 
    3236                         for ($i = 1; $i <= 45; $i++) 
     3236                        for ($i = 1; $i <= 45; ++$i) 
    32373237                        { 
    32383238                                $str_qtd .= '<option value="'.$i.'"'.($i == $_POST['qtd_dias']?' selected':'').'>'.$i.'</option>'."\n"; 
     
    32723272 
    32733273                        $str = ''; 
    3274                         for ($i = 0; $i < 20; $i++) 
    3275                         { 
    3276                                 $m++; 
     3274                        for ($i = 0; $i < 20; ++$i) 
     3275                        { 
     3276                                ++$m; 
    32773277                                if ($m > 12) 
    32783278                                { 
    32793279                                        $m = 1; 
    3280                                         $y++; 
     3280                                        ++$y; 
    32813281                                } 
    32823282                                $d = mktime(0,0,0,$m,1,$y); 
     
    33043304 
    33053305                                $str = ''; 
    3306                                 for ($i = -7; $i <= 7; $i++) 
     3306                                for ($i = -7; $i <= 7; ++$i) 
    33073307                                { 
    33083308                                        $begin = $sun + (7*24*60*60 * $i) + 12*60*60;   // we use midday, that changes in daylight-saveing does not effect us 
     
    33293329 
    33303330                        $str = ''; 
    3331                         for ($i = ($this->bo->year - 3); $i < ($this->bo->year + 3); $i++) 
     3331                        for ($i = ($this->bo->year - 3); $i < ($this->bo->year + 3); ++$i) 
    33323332                        { 
    33333333                                $str .= '<option value="'.$i.'"'.($i == $this->bo->year?' selected':'').'>'.$i.'</option>'."\n"; 
     
    33583358                                $date_str .= '    <input type="hidden" name="year" value="'.$this->bo->year.'">'."\n"; 
    33593359 
    3360                                 for($i=1; $i<=6; $i++) 
     3360                                for($i=1; $i<=6; ++$i) 
    33613361                                { 
    33623362                                        $str .= '<option value="'.$i.'"'.($i == $this->bo->num_months?' selected':'').'>'.$i.'</option>'."\n"; 
     
    36073607 
    36083608                        $description = $this->bo->get_short_field($event,$is_private,'description'); 
    3609                         for($i=0;$i<count($picture);$i++) 
     3609                        for($i=0;$i<count($picture);++$i) 
    36103610                        { 
    36113611                                $var = Array( 
     
    37973797 
    37983798                        $description = $this->bo->get_short_field($event,$is_private,'description'); 
    3799                         for($i=0;$i<count($picture);$i++) 
     3799                        for($i=0;$i<count($picture);++$i) 
    38003800                        { 
    38013801                                $var = Array( 
     
    38683868 
    38693869                        $overlap = ''; 
    3870                         for($i=0;$i<count($overlapping_events);$i++) 
     3870                        for($i=0;$i<count($overlapping_events);++$i) 
    38713871                        { 
    38723872                                $overlapped_event = $this->bo->read_entry($overlapping_events[$i],True); 
     
    40564056                        } 
    40574057 
    4058                         for($i=0;$i<7;$i++) 
     4058                        for($i=0;$i<7;++$i) 
    40594059                        { 
    40604060                                $p->set_var('col_title',lang($GLOBALS['phpgw']->datetime->days[$i])); 
     
    45364536                        $tstop = $tstart + 604800; 
    45374537                        $original_owner = $this->bo->so->owner; 
    4538                         for($i=0;$i<$counter;$i++) 
     4538                        for($i=0;$i<$counter;++$i) 
    45394539                        { 
    45404540                                $this->bo->so->owner = $owners_array[$i]; 
     
    48774877                                . '<tr><td height="1" colspan="'.((24 * $interval) + 1).'" bgcolor="black"><img src="'.$pix.'"></td></tr>' 
    48784878                                . '<tr><td width="15%"><font color="'.$this->theme['bg_text'].'" face="'.$this->theme['font'].'" size="-2">'.lang('Participant').'</font></td>'; 
    4879                         for($i=0;$i<24;$i++) 
    4880                         { 
    4881                                 for($j=0;$j<$interval;$j++) 
     4879                        for($i=0;$i<24;++$i) 
     4880                        { 
     4881                                for($j=0;$j<$interval;++$j) 
    48824882                                { 
    48834883                                        $k = ($j == 0 ? sprintf('%02d',$i).'<br>':'').sprintf('%02d',$j*$increment); 
     
    49164916                                if(!$this->bo->cached_events[$date['full']]) 
    49174917                                { 
    4918                                         for($j=0;$j<24;$j++) 
     4918                                        for($j=0;$j<24;++$j) 
    49194919                                        { 
    4920                                                 for($k=0;$k<$interval;$k++) 
     4920                                                for($k=0;$k<$interval;++$k) 
    49214921                                                { 
    49224922                                                        $str .= '<td height="1" align="left" bgcolor="'.$this->theme['bg_color'].'" color="#999999">&nbsp;</td>'; 
     
    49284928                                { 
    49294929                                        $time_slice = $this->bo->prepare_matrix($interval,$increment,$part,$date['full']); 
    4930                                         for($h=0;$h<24;$h++) 
     4930                                        for($h=0;$h<24;++$h) 
    49314931                                        { 
    49324932                                                $hour = $h * 10000; 
     
    54795479                                // days 
    54805480                                $dout = '<select name="cal[alarmdays]">'."\n"; 
    5481                                 for($i=0;$i<32;$i++) 
     5481                                for($i=0;$i<32;++$i) 
    54825482                                { 
    54835483                                        $dout .= '<option value="'.$i.'"'.($i==$days?' selected':'').'>'.$i.'</option>'."\n"; 
     
    54865486                                // hours 
    54875487                                $hout = '<select name="cal[alarmhours]">'."\n"; 
    5488                                 for($i=0;$i<25;$i++) 
     5488                                for($i=0;$i<25;++$i) 
    54895489                                { 
    54905490                                        $hout .= '<option value="'.$i.'"'.($i==$hours?' selected':'').'>'.$i.'</option>'."\n"; 
     
    54935493                                // minutes 
    54945494                                $mout = '<select name="cal[alarmminutes]">'."\n"; 
    5495                                 for($i=0;$i<61;$i++) 
     5495                                for($i=0;$i<61;++$i) 
    54965496                                { 
    54975497                                        $mout .= '<option value="'.$i.'"'.($i==$min?' selected':'').'>'.$i.'</option>'."\n"; 
     
    57345734                        } 
    57355735 
    5736                         for ($i=0; $i<count($control_data['part']); $i++) 
     5736                        for ($i=0; $i<count($control_data['part']); ++$i) 
    57375737                        { 
    57385738                                $id = $control_data['part'][$i]; 
     
    57455745                        if ($control_data['action'] == lang('Delete selected contacts')) 
    57465746                        { 
    5747                                 for ($i=0; $i<count($control_data['delete']); $i++) 
     5747                                for ($i=0; $i<count($control_data['delete']); ++$i) 
    57485748                                { 
    57495749                                        $id = $control_data['delete'][$i]; 
     
    57735773                                $p->set_var('ckbox_delete_participant',$contact['name']); 
    57745774                                $p->parse('V_partlist','B_partlist',True); 
    5775                                 $total_contacts++; 
     5775                                ++$total_contacts; 
    57765776                        } 
    57775777 
     
    58945894                { 
    58955895                        $data = date("m"); 
    5896                         for ($j=0,$datetime=$startdate;$j<7;$j++,$datetime += 86400) 
     5896                        for ($j=0,$datetime=$startdate;$j<7;++$j,$datetime += 86400) 
    58975897                        { 
    58985898                                $date = date('Ymd',$datetime + (60 * 60 * 2)); // +2h to be save when switching to and from dst, $datetime is alreay + TZ-Offset 
     
    59705970                                if($holidays) 
    59715971                                { 
    5972                                         for($k=0;$k<count($holidays);$k++) 
     5972                                        for($k=0;$k<count($holidays);++$k) 
    59735973                                        { 
    59745974                                                $holiday_name[] = $holidays[$k]['name']; 
  • trunk/calendar/inc/class.uiholiday.inc.php

    r1684 r7655  
    186186                                $end = min($total,$this->bo->start+$maxmatchs); 
    187187                                $p->set_var('rows',lang('showing %1 - %2 of %3',1+$this->bo->start,$end,$total)); 
    188                                 for($i=$this->bo->start; $i < $end; $i++) 
     188                                for($i=$this->bo->start; $i < $end; ++$i) 
    189189                                { 
    190190                                        $tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color); 
     
    313313                        ); 
    314314                        $out = ''; 
    315                         for($i=0;$i<7;$i++) 
     315                        for($i=0;$i<7;++$i) 
    316316                        { 
    317317                                $out .= '<option value="'.$i.'"'.($holiday['dow']==$i?' selected':'').'>'.$dow[$i].'</option>'."\n"; 
     
    491491                        $c_holidays = count($holidays); 
    492492                        echo '<input type="hidden" name="locale" value="'.$this->bo->locales[0].'">'."\n"; 
    493                         for($i=0;$i<$c_holidays;$i++) 
     493                        for($i=0;$i<$c_holidays;++$i) 
    494494                        { 
    495495                                echo '<input type="hidden" name="name[]" value="'.htmlspecialchars($holidays[$i]['name']).'">'."\n" 
  • trunk/calendar/inc/class.uipublicview.inc.php

    r5132 r7655  
    217217                        if($this->bo->check_perms(PHPGW_ACL_PRIVATE) == True) 
    218218                        { 
    219                                 $cols++; 
     219                                ++$cols; 
    220220                        } 
    221221 
     
    268268 
    269269                        $str = ''; 
    270                         for ($i = 0; $i < 25; $i++) 
    271                         { 
    272                                 $m++; 
     270                        for ($i = 0; $i < 25; ++$i) 
     271                        { 
     272                                ++$m; 
    273273                                if ($m > 12) 
    274274                                { 
    275275                                        $m = 1; 
    276                                         $y++; 
     276                                        ++$y; 
    277277                                } 
    278278                                $d = mktime(0,0,0,$m,1,$y); 
     
    301301 
    302302                                $str = ''; 
    303                                 for ($i = -7; $i <= 7; $i++) 
     303                                for ($i = -7; $i <= 7; ++$i) 
    304304                                { 
    305305                                        $begin = $sun + (7*24*60*60 * $i) + 12*60*60;   // we use midday, that changes in daylight-saveing does not effect us 
     
    326326 
    327327                        $str = ''; 
    328                         for ($i = ($this->bo->year - 3); $i < ($this->bo->year + 3); $i++) 
     328                        for ($i = ($this->bo->year - 3); $i < ($this->bo->year + 3); ++$i) 
    329329                        { 
    330330                                $str .= '<option value="'.$i.'"'.($i == $this->bo->year?' selected':'').'>'.$i.'</option>'."\n"; 
     
    356356                                $date_str .= '    <input type="hidden" name="year" value="'.$this->bo->year.'">'."\n"; 
    357357 
    358                                 for($i=1; $i<=6; $i++) 
     358                                for($i=1; $i<=6; ++$i) 
    359359                                { 
    360360                                        $str .= '<option value="'.$i.'"'.($i == $this->bo->num_months?' selected':'').'>'.$i.'</option>'."\n"; 
     
    521521 
    522522                        $description = $this->bo->get_short_field($event,$is_private,'description'); 
    523                         for($i=0;$i<count($picture);$i++) 
     523                        for($i=0;$i<count($picture);++$i) 
    524524                        { 
    525525                                $var = Array( 
     
    617617                        } 
    618618 
    619                         for($i=0;$i<7;$i++) 
     619                        for($i=0;$i<7;++$i) 
    620620                        { 
    621621                                $p->set_var('col_title',lang($GLOBALS['phpgw']->datetime->days[$i])); 
     
    870870                function set_week_array($startdate,$cellcolor,$weekly) 
    871871                { 
    872                         for ($j=0,$datetime=$startdate;$j<7;$j++,$datetime += 86400) 
     872                        for ($j=0,$datetime=$startdate;$j<7;++$j,$datetime += 86400) 
    873873                        { 
    874874                                $date = date('Ymd',$datetime + (60 * 60 * 2)); // +2h to be save when switching to and from dst, $datetime is alreay + TZ-Offset 
     
    946946                                if($holidays) 
    947947                                { 
    948                                         for($k=0;$k<count($holidays);$k++) 
     948                                        for($k=0;$k<count($holidays);++$k) 
    949949                                        { 
    950950                                                $holiday_name[] = $holidays[$k]['name']; 
  • trunk/calendar/templates/classic/header.inc.php

    r27 r7655  
    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                        for ($i=0;$i<count($GLOBALS['HTTP_POST_VARS']['participants']);++$i) 
    108108                        { 
    109109                                $base_hidden_vars .= '    <input type="hidden" name="participants[]" value="'.$GLOBALS['HTTP_POST_VARS']['participants'][$i].'">'."\n"; 
  • trunk/calendar/templates/classic/listUsers.php

    r5132 r7655  
    8585                { 
    8686                        $sector_space = ''; 
    87                         for ($i=1; $i < $sector->sector_level; $i++) 
     87                        for ($i=1; $i < $sector->sector_level; ++$i) 
    8888                                $sector_space = '---'.$sector_space; 
    8989                        $sector->sector_name = $sector_space.' '.$sector->sector_name; 
     
    114114                $sr=ldap_list($ds, $user_context, ("(&(cn=*)(phpgwaccounttype=g))")); 
    115115                $info = ldap_get_entries($ds, $sr); 
    116                 for ($i=0; $i<$info["count"]; $i++) 
     116                for ($i=0; $i<$info["count"]; ++$i) 
    117117                        $groups[$uids=$info[$i]["gidnumber"][0]] = Array('name' =>      $uids=$info[$i]["cn"][0], 'type'        =>      g); 
    118118 
    119119                $sr=ldap_list($ds, $user_context, ("(&(cn=*)(phpgwaccounttype=u)(!(cn=lista*)))")); 
    120120                $info = ldap_get_entries($ds, $sr); 
    121                 for ($i=0; $i<$info["count"]; $i++) 
     121                for ($i=0; $i<$info["count"]; ++$i) 
    122122                { 
    123123                        if ($info[$i]["phpgwaccountvisible"][0] == '-1') 
  • trunk/calendar/templates/default/header.inc.php

    r4711 r7655  
    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                        for ($i=0;$i<count($GLOBALS['HTTP_POST_VARS']['participants']);++$i) 
    108108                        { 
    109109                                $base_hidden_vars .= '    <input type="hidden" name="participants[]" value="'.$GLOBALS['HTTP_POST_VARS']['participants'][$i].'">'."\n"; 
  • trunk/calendar/templates/default/listUsers.php

    r5509 r7655  
    9393                { 
    9494                        $sector_space = ''; 
    95                         for ($i=1; $i < $sector->sector_level; $i++) 
     95                        for ($i=1; $i < $sector->sector_level; ++$i) 
    9696                                $sector_space = '---'.$sector_space; 
    9797                        $sector->sector_name = $sector_space.' '.$sector->sector_name; 
     
    122122                $sr=ldap_list($ds, $user_context, ("(&(cn=*)(phpgwaccounttype=g))")); 
    123123                $info = ldap_get_entries($ds, $sr); 
    124                 for ($i=0; $i<$info["count"]; $i++) 
     124                for ($i=0; $i<$info["count"]; ++$i) 
    125125                        $groups[$uids=$info[$i]["gidnumber"][0]] = Array('name' =>      $uids=$info[$i]["cn"][0], 'type'        =>      g); 
    126126 
    127127                $sr=ldap_list($ds, $user_context, ("(&(cn=*)(phpgwaccounttype=u)(!(cn=lista*)))")); 
    128128                $info = ldap_get_entries($ds, $sr); 
    129                 for ($i=0; $i<$info["count"]; $i++) 
     129                for ($i=0; $i<$info["count"]; ++$i) 
    130130                { 
    131131                        if ($info[$i]["phpgwaccountvisible"][0] == '-1') 
Note: See TracChangeset for help on using the changeset viewer.