|
From: <ji...@us...> - 2008-12-29 03:07:37
|
Update of /cvsroot/phpicalendar/phpicalendar/functions/parse In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10074/functions/parse Modified Files: end_vevent.php recur_functions.php Log Message: change handling of multiday allday events in week view; other misc changes Index: end_vevent.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/parse/end_vevent.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** end_vevent.php 28 Dec 2008 19:30:41 -0000 1.20 --- end_vevent.php 29 Dec 2008 03:07:34 -0000 1.21 *************** *** 125,131 **** case 'UNTIL': # UNTIL must be in UTC ! $until = date("YmdHis",strtotime($val)); ereg ('([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})', $until, $regs); ! $until_unixtime = mktime($regs[4],$regs[5],@$regs[6],$regs[2],$regs[3],$regs[1]); $recur_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = localizeDate($dateFormat_week,$until); break; --- 125,131 ---- case 'UNTIL': # UNTIL must be in UTC ! $until = date("YmdHis",strtotime($val)); ereg ('([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})', $until, $regs); ! $until_unixtime = mktime($regs[4],@$regs[5],@$regs[6],$regs[2],$regs[3],$regs[1]); $recur_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = localizeDate($dateFormat_week,$until); break; *************** *** 182,186 **** if($current_view == 'search') $freq_type = 'none'; # $recur is the recurrence info that goes into the master array for this VEVENT ! $recur = @$recur_array[($start_date)][($hour.$minute)][$uid]['recur']; /* ============================ Load $recur_data ============================ --- 182,187 ---- if($current_view == 'search') $freq_type = 'none'; # $recur is the recurrence info that goes into the master array for this VEVENT ! $recur =''; ! if (isset($recur_array[($start_date)][($hour.$minute)][$uid]['recur'])) $recur = $recur_array[($start_date)][($hour.$minute)][$uid]['recur']; /* ============================ Load $recur_data ============================ *************** *** 215,219 **** # stop at the until limit if set ! if(isset($until) && $end_range_unixtime > $until_unixtime) $end_range_unixtime = $until_unixtime; # more adjustments --- 216,220 ---- # stop at the until limit if set ! if(isset($until) && $end_range_unixtime > $until_unixtime) $end_range_unixtime = $until_unixtime;else $until_unixtime = $mArray_end; # more adjustments *************** *** 258,265 **** break; case 'year': ! $times = expand_bymonth($time); #echo "exp bymonth";dump_times($times); ! $times = expand_byweekno($times); #echo "exp byweekno";dump_times($times); ! $times = expand_byyearday($times); #echo "exp byyearday";dump_times($times); ! $times = expand_bymonthday($times); #echo "\nexp bymonthday";dump_times($times); foreach($times as $time){ add_recur(expand_byday($time)); --- 259,266 ---- break; case 'year': ! $times = expand_bymonth($time); #echo "exp bymonth";dump_times($times); ! $times = expand_byweekno($times); #echo "exp byweekno";dump_times($times); ! $times = expand_byyearday($times); #echo "exp byyearday";dump_times($times); ! $times = expand_bymonthday($times); #echo "\nexp bymonthday";dump_times($times); foreach($times as $time){ add_recur(expand_byday($time)); *************** *** 320,324 **** if ($this_date_tmp < $end_date_tmp) $display_end_tmp = '2400'; } ! if($this_date_tmp == $end_date_tmp && ($end_time == '0000' ||$time_key == -1)) continue; $master_array[$this_date_tmp][$time_key][$uid] = array ( 'event_start' => $start_time, # hhmm --- 321,325 ---- if ($this_date_tmp < $end_date_tmp) $display_end_tmp = '2400'; } ! if($this_date_tmp == $end_date_tmp && ($end_time == '0000' && $time_key == -1)) continue; $master_array[$this_date_tmp][$time_key][$uid] = array ( 'event_start' => $start_time, # hhmm Index: recur_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/parse/recur_functions.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** recur_functions.php 28 Dec 2008 19:30:41 -0000 1.17 --- recur_functions.php 29 Dec 2008 03:07:34 -0000 1.18 *************** *** 11,15 **** function add_recur($times,$freq=''){ global $recur_data; ! global $count, $mArray_begin, $mArray_end, $except_dates, $start_date, $start_date_unixtime,$end_range_unixtime, $day_offset, $current_view; if (!is_array($times)) $times = array($times); /* BYMONTH, BYWEEKNO, BYYEARDAY, BYMONTHDAY, BYDAY, BYHOUR, BYMINUTE, BYSECOND and BYSETPOS */ --- 11,15 ---- function add_recur($times,$freq=''){ global $recur_data; ! global $count, $mArray_begin, $mArray_end, $except_dates, $start_date, $start_date_unixtime,$end_range_unixtime,$until_unixtime, $day_offset, $current_view; if (!is_array($times)) $times = array($times); /* BYMONTH, BYWEEKNO, BYYEARDAY, BYMONTHDAY, BYDAY, BYHOUR, BYMINUTE, BYSECOND and BYSETPOS */ *************** *** 28,32 **** $until_date = date("Ymd",$end_range_unixtime); foreach ($times as $time){ ! #echo "time:". date("Ymd",$time)."\n"; if (!isset($time) || $time == '') continue; $date = date("Ymd",$time); --- 28,32 ---- $until_date = date("Ymd",$end_range_unixtime); foreach ($times as $time){ ! #echo "time:". date("Ymd",$time)." $until_date<br>\n"; if (!isset($time) || $time == '') continue; $date = date("Ymd",$time); *************** *** 39,42 **** --- 39,43 ---- && !in_array($time, $recur_data) && !in_array($date, $except_dates) + && $time <= $until_unixtime && $time >= $start_date_unixtime && $date <= $until_date |