Changeset 7673 for trunk/calendar/inc
- Timestamp:
- 12/18/12 16:15:29 (11 years ago)
- Location:
- trunk/calendar/inc
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/calendar/inc/class.bocalendar.inc.php
r7655 r7673 1252 1252 $minparts = min($l_participants); 1253 1253 $part = Array(); 1254 for($i=0;$i<count($parts);++$i) 1254 $parts_count = count($parts); 1255 for($i=0;$i<$parts_count;++$i) 1255 1256 { 1256 1257 if (($accept_type = substr($parts[$i],-1,1)) == '0' || (int)$accept_type > 0) … … 2137 2138 { 2138 2139 $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) 2140 2142 { 2141 2143 $exception[] = (int)$exceptions[$exception_count]; … … 2196 2198 } 2197 2199 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) 2199 2202 { 2200 2203 if($this->cached_events[$date][$i]['id'] == $event['id'] || $this->cached_events[$date][$i]['reference'] == $event['id']) … … 2575 2578 { 2576 2579 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) 2578 2582 { 2579 2583 echo '<!-- Date: '.$search_date.' ['.$i.'] = '.$this->cached_events[$search_date][$i]['id'].' -->'."\n"; … … 2866 2870 2867 2871 //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 ){ 2869 2874 if( $sts[i] === "R") 2870 2875 unset( $sts[i] ); … … 4436 4441 { 4437 4442 $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) 4439 4445 { 4440 4446 if($GLOBALS['phpgw']->accounts->exists($event['groups'][$i])) -
trunk/calendar/inc/class.boholiday.inc.php
r7655 r7673 364 364 { 365 365 $new_holidays = Array(); 366 for($i=0;$i<count($holidays);++$i) 366 $holidays_count = count($holidays); 367 for($i=0;$i<$holidays_count;++$i) 367 368 { 368 369 // echo "Setting Holidays Date : ".date('Ymd',$holidays[$i]['date'])."<br>\n"; … … 386 387 387 388 $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) 389 391 { 390 392 $c = $i; -
trunk/calendar/inc/class.boicalendar.inc.php
r7655 r7673 1434 1434 //$this->debug('parse_parameters array return_value: '._debug_array($return_value,False)); 1435 1435 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) { 1437 1438 $name = strtolower($return_value[$i]['param']); 1438 1439 $value = $this->strip_quotes($return_value[$i]['value']); … … 1661 1662 if (!empty ($event[$value])) { 1662 1663 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) { 1664 1666 $str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . $this->build_parameters($event[$value][$i], $value)); 1665 1667 } … … 1674 1676 case 'uri' : 1675 1677 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) { 1677 1680 $str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . $this->build_parameters($event[$value][$i], $to_text)); 1678 1681 } … … 1682 1685 if (!empty ($event[$value])) { 1683 1686 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) { 1685 1689 $str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . $this->build_parameters($event[$value][$i], $value)); 1686 1690 } … … 1712 1716 if (@ $this->parameter[$key]['type'] != 'function') { 1713 1717 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) { 1715 1720 $str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . $this->build_parameters($event[$value][$i], $value)); 1716 1721 } … … 1721 1726 $function = $this->parameter[$value]['function']; 1722 1727 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) { 1724 1730 $str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . ':' . $this-> $function ($event[$value][$i])); 1725 1731 } … … 1732 1738 case 'cal-address' : 1733 1739 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) { 1735 1742 $temp_output = $this->build_parameters($event[$value][$j], $value); 1736 1743 if ($temp_output) { … … 1748 1755 } 1749 1756 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) { 1751 1759 $str .= $this->build_xtype($event['x_type'][$i], ':'); 1752 1760 } … … 1755 1763 if ($ical_item == 'vtimezone') { 1756 1764 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) { 1758 1767 $str .= 'BEGIN:' . strtoupper($event['tzdata'][$k]['type']) . "\r\n"; 1759 1768 $str .= $this->build_card_internals(strtolower($event['tzdata'][$k]['type']), $event['tzdata'][$k]); … … 1763 1772 } 1764 1773 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) { 1766 1776 $str .= 'BEGIN:VALARM' . "\r\n"; 1767 1777 $str .= $this->build_card_internals('valarm', $event['alarm'][$k]); -
trunk/calendar/inc/class.socalendar.inc.php
r7655 r7673 179 179 $events = $this->list_events($startYear,$startMonth,$startDay,$endYear,$endMonth,$endDay); 180 180 $events_cached = Array(); 181 for($i=0;$i<count($events);++$i) 181 $events_count = count($events); 182 for($i=0;$i<$events_count;++$i) 182 183 { 183 184 $events_cached[] = $this->read_entry($events[$i]); -
trunk/calendar/inc/class.socalendar_sql.inc.php
r7655 r7673 597 597 { 598 598 $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) 600 601 { 601 602 $this->add_attribute('groups',$groups[$j],$j-1); -
trunk/calendar/inc/class.uicalendar.inc.php
r7655 r7673 328 328 ); 329 329 } 330 for($l=0;$l<count($var);++$l) 330 $var_count = count($var); 331 for($l=0;$l<$var_count;++$l) 331 332 { 332 333 $this->output_template_array($mini_cal_tpl,'monthweek_day','mini_day',$var[$l]); … … 1331 1332 $str = ''; 1332 1333 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) 1334 1336 { 1335 1337 $str .= ' <option value="'.$i.'">'.$GLOBALS['phpgw']->common->show_date($event['recur_exception'][$i]).'</option>'."\n"; … … 1457 1459 // Add participants 1458 1460 $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) 1460 1463 { 1461 1464 $this->bo->add_attribute('participants','A',$participants[$_f_part]); … … 2809 2812 $accounts = $GLOBALS['phpgw']->acl->get_ids_for_location('run',1,'calendar'); 2810 2813 $users = Array(); 2811 for($i=0;$i<count($accounts);++$i) 2814 $accounts_count = count($accounts); 2815 for($i=0;$i<$accounts_count;++$i) 2812 2816 { 2813 2817 $user = $accounts[$i]; … … 2820 2824 if($group_members != False) 2821 2825 { 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) 2823 2828 { 2824 2829 if(!isset($users[$group_members[$j]])) … … 2861 2866 ); 2862 2867 2863 for($i=0;$i<count($var);++$i) 2868 $var_count = count($var); 2869 for($i=0;$i<$var_count;++$i) 2864 2870 { 2865 2871 $this->output_template_array($p,'rows','list',$var[$i]); … … 3607 3613 3608 3614 $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) 3610 3617 { 3611 3618 $var = Array( … … 3797 3804 3798 3805 $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) 3800 3808 { 3801 3809 $var = Array( … … 3868 3876 3869 3877 $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) 3871 3880 { 3872 3881 $overlapped_event = $this->bo->read_entry($overlapping_events[$i],True); … … 5734 5743 } 5735 5744 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) 5737 5747 { 5738 5748 $id = $control_data['part'][$i]; … … 5745 5755 if ($control_data['action'] == lang('Delete selected contacts')) 5746 5756 { 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) 5748 5759 { 5749 5760 $id = $control_data['delete'][$i]; … … 5970 5981 if($holidays) 5971 5982 { 5972 for($k=0;$k<count($holidays);++$k) 5983 $holidays_count = count($holidays); 5984 for($k=0;$k<$holidays_count;++$k) 5973 5985 { 5974 5986 $holiday_name[] = $holidays[$k]['name']; -
trunk/calendar/inc/class.uipublicview.inc.php
r7655 r7673 521 521 522 522 $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) 524 525 { 525 526 $var = Array( … … 946 947 if($holidays) 947 948 { 948 for($k=0;$k<count($holidays);++$k) 949 $holidays_count = count($holidays); 950 for($k=0;$k<$holidays_count;++$k) 949 951 { 950 952 $holiday_name[] = $holidays[$k]['name'];
Note: See TracChangeset
for help on using the changeset viewer.