You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(5) |
Feb
(25) |
Mar
(18) |
Apr
|
May
(26) |
Jun
(14) |
Jul
(1) |
Aug
(5) |
Sep
(82) |
Oct
(3) |
Nov
(130) |
Dec
(9) |
2004 |
Jan
(4) |
Feb
(62) |
Mar
|
Apr
(3) |
May
(100) |
Jun
|
Jul
(6) |
Aug
(49) |
Sep
(33) |
Oct
(47) |
Nov
(2) |
Dec
(1) |
2005 |
Jan
|
Feb
(4) |
Mar
(1) |
Apr
(8) |
May
(17) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
(26) |
Oct
(18) |
Nov
(37) |
Dec
(14) |
2006 |
Jan
(2) |
Feb
(18) |
Mar
(34) |
Apr
(52) |
May
(7) |
Jun
(3) |
Jul
(2) |
Aug
(10) |
Sep
|
Oct
|
Nov
(18) |
Dec
(4) |
2007 |
Jan
|
Feb
(7) |
Mar
(7) |
Apr
(6) |
May
(52) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(15) |
Nov
|
Dec
(1) |
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(250) |
2009 |
Jan
(35) |
Feb
(45) |
Mar
|
Apr
(4) |
May
(35) |
Jun
(13) |
Jul
(49) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(11) |
2010 |
Jan
(3) |
Feb
(30) |
Mar
|
Apr
(35) |
May
(12) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
From: <par...@us...> - 2010-12-03 20:35:26
|
Update of /cvsroot/phpicalendar/phpicalendar/functions/parse In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14641/functions/parse Modified Files: Tag: version-2-4 end_vevent.php Log Message: Fix "Mozilla-style" all-day events. http://phpicalendar.net/forums/viewtopic.php?f=55&t=4294 Index: end_vevent.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/parse/end_vevent.php,v retrieving revision 1.28.4.1 retrieving revision 1.28.4.2 diff -C2 -d -r1.28.4.1 -r1.28.4.2 *** end_vevent.php 3 Dec 2010 20:32:56 -0000 1.28.4.1 --- end_vevent.php 3 Dec 2010 20:35:18 -0000 1.28.4.2 *************** *** 43,51 **** $end_time = date ('Hi', $end_unixtime); } # at this point $end_unixtime should be set # adjust event start and end times if (isset($start_time) && isset($end_time)) { ! // Mozilla style all-day events or just really long events ! if (($end_unixtime - $start_unixtime) > 24*60*60) { $allday_start = $start_date; $allday_end = ($start_date + 1); --- 43,53 ---- $end_time = date ('Hi', $end_unixtime); } + + $length = $end_unixtime - $start_unixtime; # at this point $end_unixtime should be set # adjust event start and end times if (isset($start_time) && isset($end_time)) { ! // Mozilla style all-day events (multiples of 24-hour length) ! if ($length && (($length % 24*60*60) == 0)) { $allday_start = $start_date; $allday_end = ($start_date + 1); *************** *** 59,63 **** } - $length = $end_unixtime - $start_unixtime; if ($length < 0){ $length = 0; --- 61,64 ---- *************** *** 65,69 **** } # get hour and minute adjusted to allowed grid times ! $drawKey = drawEventTimes($start_time, $end_time, ($length >= (60*60*24))); preg_match ('/([0-9]{2})([0-9]{2})/', $drawKey['draw_start'], $time3); preg_match ('/([0-9]{2})([0-9]{2})/', $drawKey['draw_end'], $time4); --- 66,70 ---- } # get hour and minute adjusted to allowed grid times ! $drawKey = drawEventTimes($start_time, $end_time, ($length >= (24*60*60))); preg_match ('/([0-9]{2})([0-9]{2})/', $drawKey['draw_start'], $time3); preg_match ('/([0-9]{2})([0-9]{2})/', $drawKey['draw_end'], $time4); |
From: <par...@us...> - 2010-12-03 20:33:04
|
Update of /cvsroot/phpicalendar/phpicalendar In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13734 Modified Files: Tag: version-2-4 default_config.php Log Message: Remove unused "bleed time" configuration and variables. Bug 2557487 Index: default_config.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/default_config.php,v retrieving revision 1.25 retrieving revision 1.25.4.1 diff -C2 -d -r1.25 -r1.25.4.1 *** default_config.php 15 Apr 2010 17:53:18 -0000 1.25 --- default_config.php 3 Dec 2010 20:32:56 -0000 1.25.4.1 *************** *** 29,33 **** $this->calendar_path = ''; // Leave this blank on most installs, place your full FILE SYSTEM PATH to calendars if they are outside the phpicalendar folder. $this->second_offset = ''; // The time in seconds between your time and your server's time. - $this->bleed_time = '-1'; // This allows events past midnight to just be displayed on the starting date, only good up to 24 hours. Range from '0000' to '2359', or '-1' for no bleed time. $this->cookie_uri = ''; // The HTTP URL to the PHP iCalendar directory, ie. http://www.example.com/phpicalendar -- AUTO SETTING -- Only set if you are having cookie issues. $this->download_uri = ''; // The HTTP URL to your calendars directory, ie. http://www.example.com/phpicalendar/calendars -- AUTO SETTING -- Only set if you are having subscribe issues. --- 29,32 ---- |
From: <par...@us...> - 2010-12-03 20:33:04
|
Update of /cvsroot/phpicalendar/phpicalendar/functions/parse In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13734/functions/parse Modified Files: Tag: version-2-4 end_vevent.php Log Message: Remove unused "bleed time" configuration and variables. Bug 2557487 Index: end_vevent.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/parse/end_vevent.php,v retrieving revision 1.28 retrieving revision 1.28.4.1 diff -C2 -d -r1.28 -r1.28.4.1 *** end_vevent.php 16 Apr 2010 19:10:17 -0000 1.28 --- end_vevent.php 3 Dec 2010 20:32:56 -0000 1.28.4.1 *************** *** 55,62 **** if (isset($start_unixtime,$end_unixtime) && date('Ymd',$start_unixtime) < date('Ymd',$end_unixtime)) { $spans_day = true; - $bleed_check = (($start_unixtime - $end_unixtime) <= (60*60*24)) ? '-1' : '0'; } else { $spans_day = false; - $bleed_check = 0; } --- 55,60 ---- |
From: <par...@us...> - 2010-12-03 20:20:28
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv10636/functions Modified Files: Tag: version-2-4 ical_parser.php Log Message: Remote web calendars should be copied to the temp directory from configuration, not the system temp. Index: ical_parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v retrieving revision 1.265 retrieving revision 1.265.4.1 diff -C2 -d -r1.265 -r1.265.4.1 *** ical_parser.php 12 May 2010 19:32:37 -0000 1.265 --- ical_parser.php 3 Dec 2010 20:20:20 -0000 1.265.4.1 *************** *** 105,109 **** * See: http://phpicalendar.net/forums/viewtopic.php?f=45&t=4140#p14451 */ ! $filename = tempnam(sys_get_temp_dir(), 'ICS'); if (copy($cal_httpPrefix, $filename) === FALSE) { exit(error($lang['l_copy_error'], $cal_httpPrefix)); --- 105,109 ---- * See: http://phpicalendar.net/forums/viewtopic.php?f=45&t=4140#p14451 */ ! $filename = tempnam($phpiCal_config->tmp_dir, 'ICS'); if (copy($cal_httpPrefix, $filename) === FALSE) { exit(error($lang['l_copy_error'], $cal_httpPrefix)); |
From: <par...@us...> - 2010-06-15 15:23:24
|
Update of /cvsroot/phpicalendar/phpicalendar/functions/parse In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv8391/functions/parse Modified Files: recur_functions.php Log Message: Merge with 2.4 branch. Index: recur_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/parse/recur_functions.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** recur_functions.php 27 May 2010 15:47:24 -0000 1.22 --- recur_functions.php 15 Jun 2010 15:23:16 -0000 1.23 *************** *** 46,50 **** $count--; if (($time >= $mArray_begin) && ! ($time <= $mArray_end) ($count >= 0)) { $recur_data[] = $time; --- 46,50 ---- $count--; if (($time >= $mArray_begin) && ! ($time <= $mArray_end) && ($count >= 0)) { $recur_data[] = $time; *************** *** 54,60 **** $count--; } - else if (in_array($date, $except_dates)) { - $count--; - } } #dump_times($recur_data); --- 54,57 ---- |
From: <par...@us...> - 2010-06-15 15:13:08
|
Update of /cvsroot/phpicalendar/phpicalendar/functions/parse In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv5939/functions/parse Modified Files: Tag: version-2-4 recur_functions.php Log Message: Fix php syntax error from previous cleanup commit. Index: recur_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/parse/recur_functions.php,v retrieving revision 1.20.2.1.2.2 retrieving revision 1.20.2.1.2.3 diff -C2 -d -r1.20.2.1.2.2 -r1.20.2.1.2.3 *** recur_functions.php 27 May 2010 15:40:36 -0000 1.20.2.1.2.2 --- recur_functions.php 15 Jun 2010 15:12:56 -0000 1.20.2.1.2.3 *************** *** 46,50 **** $count--; if (($time >= $mArray_begin) && ! ($time <= $mArray_end) ($count >= 0)) { $recur_data[] = $time; --- 46,50 ---- $count--; if (($time >= $mArray_begin) && ! ($time <= $mArray_end) && ($count >= 0)) { $recur_data[] = $time; |
From: <par...@us...> - 2010-05-27 15:47:32
|
Update of /cvsroot/phpicalendar/phpicalendar/functions/parse In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv15657/functions/parse Modified Files: recur_functions.php Log Message: Merge version-2-4 Index: recur_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/parse/recur_functions.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** recur_functions.php 26 May 2010 15:03:12 -0000 1.21 --- recur_functions.php 27 May 2010 15:47:24 -0000 1.22 *************** *** 9,13 **** */ ! 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; --- 9,13 ---- */ ! 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; *************** *** 15,51 **** /* BYMONTH, BYWEEKNO, BYYEARDAY, BYMONTHDAY, BYDAY, BYHOUR, BYMINUTE, BYSECOND and BYSETPOS */ #dump_times($times); ! if ($current_view != 'search'){ ! $times = restrict_bymonth($times,$freq); ! # $times = restrict_byweekno($times,$freq); ! $times = restrict_byyearday($times,$freq); ! $times = restrict_bymonthday($times,$freq); ! $times = restrict_byday($times,$freq); ! if($start_date_unixtime > $mArray_begin) $times[] = $start_date_unixtime; ! $times = restrict_bysetpos($times,$freq);#echo "restrict_bysetpos"; $times = array_unique($times); sort($times); } ! $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); ! $time = strtotime("$date 12:00:00"); # day offset fixes shifts across day boundaries due to time diffs. # These are already fixed for the initial instance, but need to be fixed for recurrences ! if (date("Ymd", $time) != $start_date) $time = $time + $day_offset * (24*60*60); ! if(isset($time) ! && $time != '' ! && !in_array($time, $recur_data) ! && !in_array($date, $except_dates) ! && $time <= $until_unixtime ! && $time >= $start_date_unixtime ! && $date <= $until_date ! ){ ! $count--; #echo "\n.$count\n"; ! if($time >= $mArray_begin ! && $time <= $mArray_end ! && $count >= 0 ! ) $recur_data[] = $time; } else if (in_array($date, $except_dates)) { --- 15,56 ---- /* BYMONTH, BYWEEKNO, BYYEARDAY, BYMONTHDAY, BYDAY, BYHOUR, BYMINUTE, BYSECOND and BYSETPOS */ #dump_times($times); ! if ($current_view != 'search') { ! $times = restrict_bymonth($times, $freq); ! # $times = restrict_byweekno($times, $freq); ! $times = restrict_byyearday($times, $freq); ! $times = restrict_bymonthday($times, $freq); ! $times = restrict_byday($times, $freq); ! if ($start_date_unixtime > $mArray_begin) $times[] = $start_date_unixtime; ! $times = restrict_bysetpos($times, $freq); $times = array_unique($times); sort($times); } ! foreach ($times as $time) { if (!isset($time) || $time == '') continue; ! ! // Why are we arbitrarily setting the time to noon? ! $date = date('Ymd', $time); ! $time = strtotime($date . ' 12:00:00'); ! $until_date = date('Ymd', $until_unixtime); ! $until_unixtime = strtotime($until_date . ' 12:00:00'); ! # day offset fixes shifts across day boundaries due to time diffs. # These are already fixed for the initial instance, but need to be fixed for recurrences ! if (date('Ymd', $time) != $start_date) $time = $time + ($day_offset * 24 * 60 * 60); ! if ((isset($time)) && ! (!in_array($time, $recur_data)) && ! (!in_array($date, $except_dates)) && ! ($time <= $until_unixtime) && ! ($time >= $start_date_unixtime) && ! ($date <= $until_date)) { ! $count--; ! if (($time >= $mArray_begin) && ! ($time <= $mArray_end) ! ($count >= 0)) { ! $recur_data[] = $time; ! } ! } ! else if (in_array($date, $except_dates)) { ! $count--; } else if (in_array($date, $except_dates)) { *************** *** 56,72 **** return; } ! function expand_bymonth($time){ global $bymonth, $byweekno, $bymonthday, $year, $start_unixtime, $freq_type; ! if(!empty($byweekno)) return $time; ! if(empty($bymonth)) $bymonth = array(date("m", $start_unixtime)); ! $d = date("d",$start_unixtime); if (!empty($bymonthday)) $d = 1; ! foreach ($bymonth as $m){ ! $time = mktime(12,0,0,$m,$d,$year); #echo "exm:".date("Ymd",$time)."\n"; $times[] = $time; } return $times; } ! function expand_byweekno($times){ global $byweekno, $year, $freq_type, $wkst, $wkst3char; # byweekno is only used when repeat is yearly --- 61,79 ---- return; } ! ! function expand_bymonth($time) { global $bymonth, $byweekno, $bymonthday, $year, $start_unixtime, $freq_type; ! if (!empty($byweekno)) return $time; ! if (empty($bymonth)) $bymonth = array(date('m', $start_unixtime)); ! $d = date('d', $start_unixtime); if (!empty($bymonthday)) $d = 1; ! foreach ($bymonth as $m) { ! $time = mktime(12, 0, 0, $m, $d, $year); $times[] = $time; } return $times; } ! ! function expand_byweekno($times) { global $byweekno, $year, $freq_type, $wkst, $wkst3char; # byweekno is only used when repeat is yearly *************** *** 75,84 **** if ($freq_type != 'year') return $times; if (empty($byweekno)) return $times; ! $total_weeks = date("W",mktime(12,0,0,12,24,$year) ) +1; ! $w1_start = strtotime("this $wkst3char", mktime(12,0,0,1,1,$year) ); ! foreach($byweekno as $weekno){ ! if($weekno < 0) $weekno = $weekno + $total_weeks; ! #echo "\n $wkst3char w1st:".date("Ymd", $w1_start)." ".date("Ymd", mktime(12,0,0,1,1,$year))." weekno:$weekno"; ! $new_times[] = strtotime("+".(($weekno-1)*7)."days",$w1_start); } #dump_times($new_times); --- 82,92 ---- if ($freq_type != 'year') return $times; if (empty($byweekno)) return $times; ! $total_weeks = date('W', mktime(12, 0, 0, 12, 24, $year)) + 1; ! $w1_start = strtotime('this ' . $wkst3char, mktime(12, 0, 0, 1, 1, $year)); ! foreach ($byweekno as $weekno) { ! if ($weekno < 0) { ! $weekno = $weekno + $total_weeks; ! } ! $new_times[] = strtotime('+' . (($weekno - 1) * 7) . ' days', $w1_start); } #dump_times($new_times); *************** *** 86,90 **** } ! function expand_byyearday($times){ global $byyearday, $year; if (empty($byyearday)) return $times; --- 94,98 ---- } ! function expand_byyearday($times) { global $byyearday, $year; if (empty($byyearday)) return $times; *************** *** 92,100 **** $ny = $year+1; $new_times = array(); ! foreach($times as $time){ ! foreach($byyearday as $yearday){ ! if($yearday > 0){ $day = strtotime("+$yearday days Dec 31, $py");#echo "\n".date("Ymd",$day)." = +$yearday days Dec 31, $py"; ! }else $day = strtotime("Jan 1 $ny $yearday days"); ! if(date("Y",$day == $year)) $new_times[] = $day; } } --- 100,112 ---- $ny = $year+1; $new_times = array(); ! foreach ($times as $time){ ! foreach ($byyearday as $yearday) { ! if ($yearday > 0) { ! $day = strtotime('+' . $yearday . ' days Dec 31, ' . $py); ! } ! else { ! $day = strtotime('Jan 1 ' . $ny . ' ' . $yearday . ' days'); ! } ! if (date('Y', $day == $year)) $new_times[] = $day; } } *************** *** 103,115 **** } ! function expand_bymonthday($times){ global $bymonthday, $year; if (empty($bymonthday)) return $times; ! foreach($times as $time){ ! $month = date('m',$time); ! foreach($bymonthday as $monthday){ ! if($monthday < 0) $monthday = date("t",$time) + $monthday +1; ! $new_times[] = mktime(12,0,0,$month,$monthday,$year); ! #echo "monthday:$monthday\n"; } } --- 115,128 ---- } ! function expand_bymonthday($times) { global $bymonthday, $year; if (empty($bymonthday)) return $times; ! foreach ($times as $time) { ! $month = date('m', $time); ! foreach ($bymonthday as $monthday) { ! if ($monthday < 0) { ! $monthday = (date('t', $time) + $monthday + 1); ! } ! $new_times[] = mktime(12, 0, 0, $month, $monthday, $year); } } *************** *** 117,127 **** } ! function expand_byday($time){ global $freq_type, $byday, $bymonth,$byweekno, $wkst3char, $year, $month, $start_unixtime, $summary; if (empty($byday)) return array($time); $times = array(); ! $the_sunday = dateOfWeek(date("Ymd",$time), $wkst3char); ! #echo "<pre>$summary $freq_type ".print_r($byday,true)."$wkst3char $the_sunday</pre>"; ! foreach($byday as $key=>$day) { /* set $byday_arr [0] => byday string, e.g. 4TH --- 130,139 ---- } ! function expand_byday($time) { global $freq_type, $byday, $bymonth,$byweekno, $wkst3char, $year, $month, $start_unixtime, $summary; if (empty($byday)) return array($time); $times = array(); ! $the_sunday = dateOfWeek(date('Ymd', $time), $wkst3char); ! foreach ($byday as $key => $day) { /* set $byday_arr [0] => byday string, e.g. 4TH *************** *** 132,157 **** ereg ('([-\+]{0,1})?([0-9]+)?([A-Z]{2})', $day, $byday_arr); $on_day = two2threeCharDays($byday_arr[3]); ! switch($freq_type){ case 'week': #need to find the first day of the appropriate week. ! $next_date_time = strtotime("this $on_day",strtotime($the_sunday)) + (12 * 60 * 60); $times[] = $next_date_time; break; case 'month': ! $time = mktime(12,0,0,$month,1,$year); case 'year': ! if(empty($byweekno)){ ! $week_arr = array(1,2,3,4,5); if(isset($byday_arr[2]) && $byday_arr[2] !='') $week_arr = array($byday_arr[2]); ! $month_start = strtotime(date("Ym01",$time)) - (24 * 60 * 60); ! $month_end = strtotime(date("Ymt",$time))+ (36 * 60 * 60); ! if($freq_type == 'year' && empty($bymonth)){ ! $month_start = mktime(12,0,0,1,0,$year); ! $month_end = mktime(12,0,0,1,1,$year+1); } ! $month_start_day = strtolower(date("D", $month_start)); ! foreach($week_arr as $week){ ! #echo "<pre>$summary ".$byday_arr[1].$week.$on_day." st:".date("Ymd",$month_start)." t:".date("Ymd",$time)."\n"; ! if($byday_arr[1] == '-') $next_date_time = strtotime($byday_arr[1].$week.$on_day,$month_end); else { # we need this special offset in case the event day coincides with the month start day --- 144,171 ---- ereg ('([-\+]{0,1})?([0-9]+)?([A-Z]{2})', $day, $byday_arr); $on_day = two2threeCharDays($byday_arr[3]); ! switch ($freq_type) { case 'week': #need to find the first day of the appropriate week. ! $next_date_time = strtotime('this ' . $on_day, strtotime($the_sunday)) + (12 * 60 * 60); $times[] = $next_date_time; break; case 'month': ! $time = mktime(12, 0, 0, $month, 1, $year); ! // FIXME: Is this supposed to fall through? case 'year': ! if (empty($byweekno)) { ! $week_arr = array(1, 2, 3, 4, 5); if(isset($byday_arr[2]) && $byday_arr[2] !='') $week_arr = array($byday_arr[2]); ! $month_start = strtotime(date('Ym01', $time)) - (24 * 60 * 60); ! $month_end = strtotime(date('Ymt', $time)) + (36 * 60 * 60); ! if ($freq_type == 'year' && empty($bymonth)) { ! $month_start = mktime(12, 0, 0, 1, 0, $year); ! $month_end = mktime(12, 0, 0, 1, 1, $year + 1); } ! $month_start_day = strtolower(date('D', $month_start)); ! foreach ($week_arr as $week) { ! if ($byday_arr[1] == '-') { ! $next_date_time = strtotime($byday_arr[1] . $week . $on_day, $month_end); ! } else { # we need this special offset in case the event day coincides with the month start day *************** *** 162,235 **** } # check that we're still in the same month ! if (date("m",$next_date_time) == date("m",$time) ) $times[] = $next_date_time; } ! }else{ # byweekno should act like freq_type = week ! $next_date_time = strtotime("this $on_day",strtotime($the_sunday)) + (12 * 60 * 60); $times[] = $next_date_time; } break; default: ! $month_start = strtotime(date("Ym01",$time)); ! $next_date_time = strtotime($byday_arr[1].$byday_arr[2].$on_day, $month_start); } } - #echo "exp byday";dump_times($times); return $times; } ! ! function restrict_bymonth($times,$freq=''){ global $bymonth, $byyearday; if (empty($bymonth) || !empty($byyearday)) return $times; ! $new_times=array(); ! foreach ($times as $time){ ! if(in_array(date("m", $time), $bymonth)) $new_times[] = $time; } return $new_times; } ! function restrict_byweekno($times,$freq=''){ global $byweekno; ! if(empty($byweekno)) return $times; ! $new_times=array(); ! foreach ($times as $time) if(in_array(date("W", $time), $byweekno)) $new_times[] = $time; return $new_times; } ! function restrict_byyearday($times,$freq=''){ global $byyearday; ! if(empty($byyearday)) return $times; ! $new_times=array(); ! foreach ($times as $time){ ! foreach ($byyearday as $yearday){ ! if($yearday < 0){ ! $yearday = 365 + $yearday +1; ! if(date("L",$time)) $yearday += 1; } $yearday_arr[] = $yearday; } ! # date(z,$time) gives 0 for Jan 1 ! if(in_array((date("z", $time)+1), $yearday_arr)) $new_times[] = $time; } return $new_times; } ! function restrict_bymonthday($times,$freq=''){ global $bymonthday; ! if(empty($bymonthday)) return $times; ! $new_times=array(); ! foreach ($times as $time){ ! foreach ($bymonthday as $monthday){ ! if($monthday < 0) $monthday = date("t",$time) + $monthday +1; $monthday_arr[] = $monthday; } ! if(in_array(date("j", $time), $monthday_arr)) $new_times[] = $time; } return $new_times; } ! function restrict_byday($times,$freq=''){ global $byday; ! if(empty($byday)) return $times; ! foreach($byday as $key=>$day) { /* set $byday_arr [0] => byday string, e.g. 4TH --- 176,255 ---- } # check that we're still in the same month ! if (date('m', $next_date_time) == date('m', $time)) $times[] = $next_date_time; } ! } ! else { # byweekno should act like freq_type = week ! $next_date_time = strtotime('this ' . $on_day, strtotime($the_sunday)) + (12 * 60 * 60); $times[] = $next_date_time; } break; default: ! $month_start = strtotime(date('Ym01', $time)); ! $next_date_time = strtotime($byday_arr[1] . $byday_arr[2] . $on_day, $month_start); ! break; } } return $times; } ! function restrict_bymonth($times, $freq = '') { global $bymonth, $byyearday; if (empty($bymonth) || !empty($byyearday)) return $times; ! $new_times = array(); ! foreach ($times as $time) { ! if (in_array(date('m', $time), $bymonth)) $new_times[] = $time; } return $new_times; } ! ! function restrict_byweekno($times, $freq = '') { global $byweekno; ! if (empty($byweekno)) return $times; ! $new_times = array(); ! foreach ($times as $time) { ! if (in_array(date('W', $time), $byweekno)) $new_times[] = $time; ! } return $new_times; } ! ! function restrict_byyearday($times, $freq = '') { global $byyearday; ! if (empty($byyearday)) return $times; ! $new_times = array(); ! foreach ($times as $time) { ! foreach ($byyearday as $yearday) { ! if ($yearday < 0) { ! $yearday = 365 + $yearday + 1; ! if (date('L', $time)) $yearday += 1; } $yearday_arr[] = $yearday; } ! # date('z', $time) gives 0 for Jan 1 ! if (in_array((date('z', $time) + 1), $yearday_arr)) $new_times[] = $time; } return $new_times; } ! function restrict_bymonthday($times, $freq = '') { global $bymonthday; ! if (empty($bymonthday)) return $times; ! $new_times = array(); ! foreach ($times as $time) { ! foreach ($bymonthday as $monthday) { ! if ($monthday < 0) { ! $monthday = date('t', $time) + $monthday + 1; ! } $monthday_arr[] = $monthday; } ! if (in_array(date('j', $time), $monthday_arr)) $new_times[] = $time; } return $new_times; } ! function restrict_byday($times, $freq = '') { global $byday; ! if (empty($byday)) return $times; ! foreach ($byday as $key => $day) { /* set $byday_arr [0] => byday string, e.g. 4TH *************** *** 241,256 **** $byday3[] = two2threeCharDays($byday_arr[3]); } ! $new_times=array(); ! foreach ($times as $time) if(in_array(strtolower(date("D", $time)), $byday3)) $new_times[] = $time; return $new_times; } ! function restrict_bysetpos($times,$freq=''){ global $bysetpos; ! if(empty($bysetpos)) return $times; sort($times); ! $new_times=array(); ! foreach($bysetpos as $setpos){ ! $new_times[] = implode('',array_slice($times, $setpos, 1)); } return $new_times; --- 261,278 ---- $byday3[] = two2threeCharDays($byday_arr[3]); } ! $new_times = array(); ! foreach ($times as $time) { ! if (in_array(strtolower(date('D', $time)), $byday3)) $new_times[] = $time; ! } return $new_times; } ! function restrict_bysetpos($times, $freq = '') { global $bysetpos; ! if (empty($bysetpos)) return $times; sort($times); ! $new_times = array(); ! foreach ($bysetpos as $setpos) { ! $new_times[] = implode('', array_slice($times, $setpos, 1)); } return $new_times; *************** *** 258,266 **** # for diagnostics ! function dump_times($times){ global $summary; ! echo "<pre>$summary times:"; #var_dump($times); ! foreach($times as $time) echo "\ndate:".date("Y-m-d H:i:s",$time); ! echo "</pre>"; } --- 280,290 ---- # for diagnostics ! function dump_times($times) { global $summary; ! echo '<pre>' . $summary . ' times:'; #var_dump($times); ! foreach ($times as $time) { ! echo "\ndate:" . date('Y-m-d H:i:s', $time); ! } ! echo '</pre>'; } |
From: <par...@us...> - 2010-05-27 15:40:44
|
Update of /cvsroot/phpicalendar/phpicalendar/functions/parse In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13361/functions/parse Modified Files: Tag: version-2-4 recur_functions.php Log Message: Fix RRULE:UNTIL ending too early. Thanks to jpommer: http://phpicalendar.net/forums/viewtopic.php?f=45&t=3994#p14559 Index: recur_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/parse/recur_functions.php,v retrieving revision 1.20.2.1.2.1 retrieving revision 1.20.2.1.2.2 diff -C2 -d -r1.20.2.1.2.1 -r1.20.2.1.2.2 *** recur_functions.php 27 May 2010 15:38:21 -0000 1.20.2.1.2.1 --- recur_functions.php 27 May 2010 15:40:36 -0000 1.20.2.1.2.2 *************** *** 26,35 **** sort($times); } - $until_date = date('Ymd', $end_range_unixtime); foreach ($times as $time) { if (!isset($time) || $time == '') continue; // Why are we arbitrarily setting the time to noon? $date = date('Ymd', $time); $time = strtotime($date . ' 12:00:00'); # day offset fixes shifts across day boundaries due to time diffs. # These are already fixed for the initial instance, but need to be fixed for recurrences --- 26,38 ---- sort($times); } foreach ($times as $time) { if (!isset($time) || $time == '') continue; + // Why are we arbitrarily setting the time to noon? $date = date('Ymd', $time); $time = strtotime($date . ' 12:00:00'); + $until_date = date('Ymd', $until_unixtime); + $until_unixtime = strtotime($until_date . ' 12:00:00'); + # day offset fixes shifts across day boundaries due to time diffs. # These are already fixed for the initial instance, but need to be fixed for recurrences |
From: <par...@us...> - 2010-05-27 15:38:32
|
Update of /cvsroot/phpicalendar/phpicalendar/functions/parse In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv12187/functions/parse Modified Files: Tag: version-2-4 recur_functions.php Log Message: Cleanup recur_functions.php Index: recur_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/parse/recur_functions.php,v retrieving revision 1.20.2.1 retrieving revision 1.20.2.1.2.1 diff -C2 -d -r1.20.2.1 -r1.20.2.1.2.1 *** recur_functions.php 26 May 2010 14:51:28 -0000 1.20.2.1 --- recur_functions.php 27 May 2010 15:38:21 -0000 1.20.2.1.2.1 *************** *** 9,13 **** */ ! 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; --- 9,13 ---- */ ! 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; *************** *** 15,51 **** /* BYMONTH, BYWEEKNO, BYYEARDAY, BYMONTHDAY, BYDAY, BYHOUR, BYMINUTE, BYSECOND and BYSETPOS */ #dump_times($times); ! if ($current_view != 'search'){ ! $times = restrict_bymonth($times,$freq); ! # $times = restrict_byweekno($times,$freq); ! $times = restrict_byyearday($times,$freq); ! $times = restrict_bymonthday($times,$freq); ! $times = restrict_byday($times,$freq); ! if($start_date_unixtime > $mArray_begin) $times[] = $start_date_unixtime; ! $times = restrict_bysetpos($times,$freq);#echo "restrict_bysetpos"; $times = array_unique($times); sort($times); } ! $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); ! $time = strtotime("$date 12:00:00"); # day offset fixes shifts across day boundaries due to time diffs. # These are already fixed for the initial instance, but need to be fixed for recurrences ! if (date("Ymd", $time) != $start_date) $time = $time + $day_offset * (24*60*60); ! if(isset($time) ! && $time != '' ! && !in_array($time, $recur_data) ! && !in_array($date, $except_dates) ! && $time <= $until_unixtime ! && $time >= $start_date_unixtime ! && $date <= $until_date ! ){ ! $count--; #echo "\n.$count\n"; ! if($time >= $mArray_begin ! && $time <= $mArray_end ! && $count >= 0 ! ) $recur_data[] = $time; } else if (in_array($date, $except_dates)) { --- 15,50 ---- /* BYMONTH, BYWEEKNO, BYYEARDAY, BYMONTHDAY, BYDAY, BYHOUR, BYMINUTE, BYSECOND and BYSETPOS */ #dump_times($times); ! if ($current_view != 'search') { ! $times = restrict_bymonth($times, $freq); ! # $times = restrict_byweekno($times, $freq); ! $times = restrict_byyearday($times, $freq); ! $times = restrict_bymonthday($times, $freq); ! $times = restrict_byday($times, $freq); ! if ($start_date_unixtime > $mArray_begin) $times[] = $start_date_unixtime; ! $times = restrict_bysetpos($times, $freq); $times = array_unique($times); sort($times); } ! $until_date = date('Ymd', $end_range_unixtime); ! foreach ($times as $time) { if (!isset($time) || $time == '') continue; ! // Why are we arbitrarily setting the time to noon? ! $date = date('Ymd', $time); ! $time = strtotime($date . ' 12:00:00'); # day offset fixes shifts across day boundaries due to time diffs. # These are already fixed for the initial instance, but need to be fixed for recurrences ! if (date('Ymd', $time) != $start_date) $time = $time + ($day_offset * 24 * 60 * 60); ! if ((isset($time)) && ! (!in_array($time, $recur_data)) && ! (!in_array($date, $except_dates)) && ! ($time <= $until_unixtime) && ! ($time >= $start_date_unixtime) && ! ($date <= $until_date)) { ! $count--; ! if (($time >= $mArray_begin) && ! ($time <= $mArray_end) ! ($count >= 0)) { ! $recur_data[] = $time; ! } } else if (in_array($date, $except_dates)) { *************** *** 56,72 **** return; } ! function expand_bymonth($time){ global $bymonth, $byweekno, $bymonthday, $year, $start_unixtime, $freq_type; ! if(!empty($byweekno)) return $time; ! if(empty($bymonth)) $bymonth = array(date("m", $start_unixtime)); ! $d = date("d",$start_unixtime); if (!empty($bymonthday)) $d = 1; ! foreach ($bymonth as $m){ ! $time = mktime(12,0,0,$m,$d,$year); #echo "exm:".date("Ymd",$time)."\n"; $times[] = $time; } return $times; } ! function expand_byweekno($times){ global $byweekno, $year, $freq_type, $wkst, $wkst3char; # byweekno is only used when repeat is yearly --- 55,73 ---- return; } ! ! function expand_bymonth($time) { global $bymonth, $byweekno, $bymonthday, $year, $start_unixtime, $freq_type; ! if (!empty($byweekno)) return $time; ! if (empty($bymonth)) $bymonth = array(date('m', $start_unixtime)); ! $d = date('d', $start_unixtime); if (!empty($bymonthday)) $d = 1; ! foreach ($bymonth as $m) { ! $time = mktime(12, 0, 0, $m, $d, $year); $times[] = $time; } return $times; } ! ! function expand_byweekno($times) { global $byweekno, $year, $freq_type, $wkst, $wkst3char; # byweekno is only used when repeat is yearly *************** *** 75,84 **** if ($freq_type != 'year') return $times; if (empty($byweekno)) return $times; ! $total_weeks = date("W",mktime(12,0,0,12,24,$year) ) +1; ! $w1_start = strtotime("this $wkst3char", mktime(12,0,0,1,1,$year) ); ! foreach($byweekno as $weekno){ ! if($weekno < 0) $weekno = $weekno + $total_weeks; ! #echo "\n $wkst3char w1st:".date("Ymd", $w1_start)." ".date("Ymd", mktime(12,0,0,1,1,$year))." weekno:$weekno"; ! $new_times[] = strtotime("+".(($weekno-1)*7)."days",$w1_start); } #dump_times($new_times); --- 76,86 ---- if ($freq_type != 'year') return $times; if (empty($byweekno)) return $times; ! $total_weeks = date('W', mktime(12, 0, 0, 12, 24, $year)) + 1; ! $w1_start = strtotime('this ' . $wkst3char, mktime(12, 0, 0, 1, 1, $year)); ! foreach ($byweekno as $weekno) { ! if ($weekno < 0) { ! $weekno = $weekno + $total_weeks; ! } ! $new_times[] = strtotime('+' . (($weekno - 1) * 7) . ' days', $w1_start); } #dump_times($new_times); *************** *** 86,90 **** } ! function expand_byyearday($times){ global $byyearday, $year; if (empty($byyearday)) return $times; --- 88,92 ---- } ! function expand_byyearday($times) { global $byyearday, $year; if (empty($byyearday)) return $times; *************** *** 92,100 **** $ny = $year+1; $new_times = array(); ! foreach($times as $time){ ! foreach($byyearday as $yearday){ ! if($yearday > 0){ $day = strtotime("+$yearday days Dec 31, $py");#echo "\n".date("Ymd",$day)." = +$yearday days Dec 31, $py"; ! }else $day = strtotime("Jan 1 $ny $yearday days"); ! if(date("Y",$day == $year)) $new_times[] = $day; } } --- 94,106 ---- $ny = $year+1; $new_times = array(); ! foreach ($times as $time){ ! foreach ($byyearday as $yearday) { ! if ($yearday > 0) { ! $day = strtotime('+' . $yearday . ' days Dec 31, ' . $py); ! } ! else { ! $day = strtotime('Jan 1 ' . $ny . ' ' . $yearday . ' days'); ! } ! if (date('Y', $day == $year)) $new_times[] = $day; } } *************** *** 103,115 **** } ! function expand_bymonthday($times){ global $bymonthday, $year; if (empty($bymonthday)) return $times; ! foreach($times as $time){ ! $month = date('m',$time); ! foreach($bymonthday as $monthday){ ! if($monthday < 0) $monthday = date("t",$time) + $monthday +1; ! $new_times[] = mktime(12,0,0,$month,$monthday,$year); ! #echo "monthday:$monthday\n"; } } --- 109,122 ---- } ! function expand_bymonthday($times) { global $bymonthday, $year; if (empty($bymonthday)) return $times; ! foreach ($times as $time) { ! $month = date('m', $time); ! foreach ($bymonthday as $monthday) { ! if ($monthday < 0) { ! $monthday = (date('t', $time) + $monthday + 1); ! } ! $new_times[] = mktime(12, 0, 0, $month, $monthday, $year); } } *************** *** 117,127 **** } ! function expand_byday($time){ global $freq_type, $byday, $bymonth,$byweekno, $wkst3char, $year, $month, $start_unixtime, $summary; if (empty($byday)) return array($time); $times = array(); ! $the_sunday = dateOfWeek(date("Ymd",$time), $wkst3char); ! #echo "<pre>$summary $freq_type ".print_r($byday,true)."$wkst3char $the_sunday</pre>"; ! foreach($byday as $key=>$day) { /* set $byday_arr [0] => byday string, e.g. 4TH --- 124,133 ---- } ! function expand_byday($time) { global $freq_type, $byday, $bymonth,$byweekno, $wkst3char, $year, $month, $start_unixtime, $summary; if (empty($byday)) return array($time); $times = array(); ! $the_sunday = dateOfWeek(date('Ymd', $time), $wkst3char); ! foreach ($byday as $key => $day) { /* set $byday_arr [0] => byday string, e.g. 4TH *************** *** 132,157 **** ereg ('([-\+]{0,1})?([0-9]+)?([A-Z]{2})', $day, $byday_arr); $on_day = two2threeCharDays($byday_arr[3]); ! switch($freq_type){ case 'week': #need to find the first day of the appropriate week. ! $next_date_time = strtotime("this $on_day",strtotime($the_sunday)) + (12 * 60 * 60); $times[] = $next_date_time; break; case 'month': ! $time = mktime(12,0,0,$month,1,$year); case 'year': ! if(empty($byweekno)){ ! $week_arr = array(1,2,3,4,5); if(isset($byday_arr[2]) && $byday_arr[2] !='') $week_arr = array($byday_arr[2]); ! $month_start = strtotime(date("Ym01",$time)) - (24 * 60 * 60); ! $month_end = strtotime(date("Ymt",$time))+ (36 * 60 * 60); ! if($freq_type == 'year' && empty($bymonth)){ ! $month_start = mktime(12,0,0,1,0,$year); ! $month_end = mktime(12,0,0,1,1,$year+1); } ! $month_start_day = strtolower(date("D", $month_start)); ! foreach($week_arr as $week){ ! #echo "<pre>$summary ".$byday_arr[1].$week.$on_day." st:".date("Ymd",$month_start)." t:".date("Ymd",$time)."\n"; ! if($byday_arr[1] == '-') $next_date_time = strtotime($byday_arr[1].$week.$on_day,$month_end); else { # we need this special offset in case the event day coincides with the month start day --- 138,165 ---- ereg ('([-\+]{0,1})?([0-9]+)?([A-Z]{2})', $day, $byday_arr); $on_day = two2threeCharDays($byday_arr[3]); ! switch ($freq_type) { case 'week': #need to find the first day of the appropriate week. ! $next_date_time = strtotime('this ' . $on_day, strtotime($the_sunday)) + (12 * 60 * 60); $times[] = $next_date_time; break; case 'month': ! $time = mktime(12, 0, 0, $month, 1, $year); ! // FIXME: Is this supposed to fall through? case 'year': ! if (empty($byweekno)) { ! $week_arr = array(1, 2, 3, 4, 5); if(isset($byday_arr[2]) && $byday_arr[2] !='') $week_arr = array($byday_arr[2]); ! $month_start = strtotime(date('Ym01', $time)) - (24 * 60 * 60); ! $month_end = strtotime(date('Ymt', $time)) + (36 * 60 * 60); ! if ($freq_type == 'year' && empty($bymonth)) { ! $month_start = mktime(12, 0, 0, 1, 0, $year); ! $month_end = mktime(12, 0, 0, 1, 1, $year + 1); } ! $month_start_day = strtolower(date('D', $month_start)); ! foreach ($week_arr as $week) { ! if ($byday_arr[1] == '-') { ! $next_date_time = strtotime($byday_arr[1] . $week . $on_day, $month_end); ! } else { # we need this special offset in case the event day coincides with the month start day *************** *** 162,235 **** } # check that we're still in the same month ! if (date("m",$next_date_time) == date("m",$time) ) $times[] = $next_date_time; } ! }else{ # byweekno should act like freq_type = week ! $next_date_time = strtotime("this $on_day",strtotime($the_sunday)) + (12 * 60 * 60); $times[] = $next_date_time; } break; default: ! $month_start = strtotime(date("Ym01",$time)); ! $next_date_time = strtotime($byday_arr[1].$byday_arr[2].$on_day, $month_start); } } - #echo "exp byday";dump_times($times); return $times; } ! ! function restrict_bymonth($times,$freq=''){ global $bymonth, $byyearday; if (empty($bymonth) || !empty($byyearday)) return $times; ! $new_times=array(); ! foreach ($times as $time){ ! if(in_array(date("m", $time), $bymonth)) $new_times[] = $time; } return $new_times; } ! function restrict_byweekno($times,$freq=''){ global $byweekno; ! if(empty($byweekno)) return $times; ! $new_times=array(); ! foreach ($times as $time) if(in_array(date("W", $time), $byweekno)) $new_times[] = $time; return $new_times; } ! function restrict_byyearday($times,$freq=''){ global $byyearday; ! if(empty($byyearday)) return $times; ! $new_times=array(); ! foreach ($times as $time){ ! foreach ($byyearday as $yearday){ ! if($yearday < 0){ ! $yearday = 365 + $yearday +1; ! if(date("L",$time)) $yearday += 1; } $yearday_arr[] = $yearday; } ! # date(z,$time) gives 0 for Jan 1 ! if(in_array((date("z", $time)+1), $yearday_arr)) $new_times[] = $time; } return $new_times; } ! function restrict_bymonthday($times,$freq=''){ global $bymonthday; ! if(empty($bymonthday)) return $times; ! $new_times=array(); ! foreach ($times as $time){ ! foreach ($bymonthday as $monthday){ ! if($monthday < 0) $monthday = date("t",$time) + $monthday +1; $monthday_arr[] = $monthday; } ! if(in_array(date("j", $time), $monthday_arr)) $new_times[] = $time; } return $new_times; } ! function restrict_byday($times,$freq=''){ global $byday; ! if(empty($byday)) return $times; ! foreach($byday as $key=>$day) { /* set $byday_arr [0] => byday string, e.g. 4TH --- 170,249 ---- } # check that we're still in the same month ! if (date('m', $next_date_time) == date('m', $time)) $times[] = $next_date_time; } ! } ! else { # byweekno should act like freq_type = week ! $next_date_time = strtotime('this ' . $on_day, strtotime($the_sunday)) + (12 * 60 * 60); $times[] = $next_date_time; } break; default: ! $month_start = strtotime(date('Ym01', $time)); ! $next_date_time = strtotime($byday_arr[1] . $byday_arr[2] . $on_day, $month_start); ! break; } } return $times; } ! function restrict_bymonth($times, $freq = '') { global $bymonth, $byyearday; if (empty($bymonth) || !empty($byyearday)) return $times; ! $new_times = array(); ! foreach ($times as $time) { ! if (in_array(date('m', $time), $bymonth)) $new_times[] = $time; } return $new_times; } ! ! function restrict_byweekno($times, $freq = '') { global $byweekno; ! if (empty($byweekno)) return $times; ! $new_times = array(); ! foreach ($times as $time) { ! if (in_array(date('W', $time), $byweekno)) $new_times[] = $time; ! } return $new_times; } ! ! function restrict_byyearday($times, $freq = '') { global $byyearday; ! if (empty($byyearday)) return $times; ! $new_times = array(); ! foreach ($times as $time) { ! foreach ($byyearday as $yearday) { ! if ($yearday < 0) { ! $yearday = 365 + $yearday + 1; ! if (date('L', $time)) $yearday += 1; } $yearday_arr[] = $yearday; } ! # date('z', $time) gives 0 for Jan 1 ! if (in_array((date('z', $time) + 1), $yearday_arr)) $new_times[] = $time; } return $new_times; } ! function restrict_bymonthday($times, $freq = '') { global $bymonthday; ! if (empty($bymonthday)) return $times; ! $new_times = array(); ! foreach ($times as $time) { ! foreach ($bymonthday as $monthday) { ! if ($monthday < 0) { ! $monthday = date('t', $time) + $monthday + 1; ! } $monthday_arr[] = $monthday; } ! if (in_array(date('j', $time), $monthday_arr)) $new_times[] = $time; } return $new_times; } ! function restrict_byday($times, $freq = '') { global $byday; ! if (empty($byday)) return $times; ! foreach ($byday as $key => $day) { /* set $byday_arr [0] => byday string, e.g. 4TH *************** *** 241,256 **** $byday3[] = two2threeCharDays($byday_arr[3]); } ! $new_times=array(); ! foreach ($times as $time) if(in_array(strtolower(date("D", $time)), $byday3)) $new_times[] = $time; return $new_times; } ! function restrict_bysetpos($times,$freq=''){ global $bysetpos; ! if(empty($bysetpos)) return $times; sort($times); ! $new_times=array(); ! foreach($bysetpos as $setpos){ ! $new_times[] = implode('',array_slice($times, $setpos, 1)); } return $new_times; --- 255,272 ---- $byday3[] = two2threeCharDays($byday_arr[3]); } ! $new_times = array(); ! foreach ($times as $time) { ! if (in_array(strtolower(date('D', $time)), $byday3)) $new_times[] = $time; ! } return $new_times; } ! function restrict_bysetpos($times, $freq = '') { global $bysetpos; ! if (empty($bysetpos)) return $times; sort($times); ! $new_times = array(); ! foreach ($bysetpos as $setpos) { ! $new_times[] = implode('', array_slice($times, $setpos, 1)); } return $new_times; *************** *** 258,266 **** # for diagnostics ! function dump_times($times){ global $summary; ! echo "<pre>$summary times:"; #var_dump($times); ! foreach($times as $time) echo "\ndate:".date("Y-m-d H:i:s",$time); ! echo "</pre>"; } --- 274,284 ---- # for diagnostics ! function dump_times($times) { global $summary; ! echo '<pre>' . $summary . ' times:'; #var_dump($times); ! foreach ($times as $time) { ! echo "\ndate:" . date('Y-m-d H:i:s', $time); ! } ! echo '</pre>'; } |
From: <par...@us...> - 2010-05-26 15:03:20
|
Update of /cvsroot/phpicalendar/phpicalendar/functions/parse In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv7471/functions/parse Modified Files: recur_functions.php Log Message: Merge with 2.4 branch Index: recur_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/parse/recur_functions.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** recur_functions.php 4 Feb 2010 21:48:14 -0000 1.20 --- recur_functions.php 26 May 2010 15:03:12 -0000 1.21 *************** *** 49,52 **** --- 49,55 ---- ) $recur_data[] = $time; } + else if (in_array($date, $except_dates)) { + $count--; + } } #dump_times($recur_data); |
From: <par...@us...> - 2010-05-26 15:03:20
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv7471/functions Modified Files: template.php Log Message: Merge with 2.4 branch Index: template.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/template.php,v retrieving revision 1.128 retrieving revision 1.129 diff -C2 -d -r1.128 -r1.129 *** template.php 12 May 2010 17:11:13 -0000 1.128 --- template.php 26 May 2010 15:03:12 -0000 1.129 *************** *** 187,191 **** $events_tmp = preg_replace('!<\!-- switch exceptions on -->.*<\!-- switch exceptions off -->!Uis', '', $events_tmp); }else{ ! $some_exceptions = ""; foreach ($val['exceptions'] as $except_val){ $except_tmp = $loop_except; --- 187,191 ---- $events_tmp = preg_replace('!<\!-- switch exceptions on -->.*<\!-- switch exceptions off -->!Uis', '', $events_tmp); }else{ ! $some_exceptions = ''; foreach ($val['exceptions'] as $except_val){ $except_tmp = $loop_except; *************** *** 268,274 **** foreach($master_array[($thisday)] as $ovlKey => $ovlValue) { # ovlKey is a time slot; $ovlValue is an array with key=uid ! if ($ovlKey != "-1") { foreach($ovlValue as $ovl2Value) { ! $nbrGridCols[$thisday] = kgv($nbrGridCols[$thisday], ($ovl2Value["event_overlap"] + 1)); } } --- 268,274 ---- foreach($master_array[($thisday)] as $ovlKey => $ovlValue) { # ovlKey is a time slot; $ovlValue is an array with key=uid ! if ($ovlKey != '-1') { foreach($ovlValue as $ovl2Value) { ! $nbrGridCols[$thisday] = kgv($nbrGridCols[$thisday], ($ovl2Value['event_overlap'] + 1)); } } |
From: <par...@us...> - 2010-05-26 14:51:39
|
Update of /cvsroot/phpicalendar/phpicalendar/functions/parse In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv5458/functions/parse Modified Files: Tag: version-2-4 recur_functions.php Log Message: Fix EXDATE in some cases. Thanks to jpommer: http://phpicalendar.net/forums/viewtopic.php?f=45&t=3994#p14555 Index: recur_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/parse/recur_functions.php,v retrieving revision 1.20 retrieving revision 1.20.2.1 diff -C2 -d -r1.20 -r1.20.2.1 *** recur_functions.php 4 Feb 2010 21:48:14 -0000 1.20 --- recur_functions.php 26 May 2010 14:51:28 -0000 1.20.2.1 *************** *** 49,52 **** --- 49,55 ---- ) $recur_data[] = $time; } + else if (in_array($date, $except_dates)) { + $count--; + } } #dump_times($recur_data); |
From: <par...@us...> - 2010-05-26 14:51:36
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv5458/functions Modified Files: Tag: version-2-4 template.php Log Message: Fix EXDATE in some cases. Thanks to jpommer: http://phpicalendar.net/forums/viewtopic.php?f=45&t=3994#p14555 Index: template.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/template.php,v retrieving revision 1.128 retrieving revision 1.128.2.1 diff -C2 -d -r1.128 -r1.128.2.1 *** template.php 12 May 2010 17:11:13 -0000 1.128 --- template.php 26 May 2010 14:51:27 -0000 1.128.2.1 *************** *** 187,191 **** $events_tmp = preg_replace('!<\!-- switch exceptions on -->.*<\!-- switch exceptions off -->!Uis', '', $events_tmp); }else{ ! $some_exceptions = ""; foreach ($val['exceptions'] as $except_val){ $except_tmp = $loop_except; --- 187,191 ---- $events_tmp = preg_replace('!<\!-- switch exceptions on -->.*<\!-- switch exceptions off -->!Uis', '', $events_tmp); }else{ ! $some_exceptions = ''; foreach ($val['exceptions'] as $except_val){ $except_tmp = $loop_except; *************** *** 268,274 **** foreach($master_array[($thisday)] as $ovlKey => $ovlValue) { # ovlKey is a time slot; $ovlValue is an array with key=uid ! if ($ovlKey != "-1") { foreach($ovlValue as $ovl2Value) { ! $nbrGridCols[$thisday] = kgv($nbrGridCols[$thisday], ($ovl2Value["event_overlap"] + 1)); } } --- 268,274 ---- foreach($master_array[($thisday)] as $ovlKey => $ovlValue) { # ovlKey is a time slot; $ovlValue is an array with key=uid ! if ($ovlKey != '-1') { foreach($ovlValue as $ovl2Value) { ! $nbrGridCols[$thisday] = kgv($nbrGridCols[$thisday], ($ovl2Value['event_overlap'] + 1)); } } |
From: <par...@us...> - 2010-05-12 19:32:45
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv5021/functions Modified Files: ical_parser.php Log Message: Fix URL in comment Index: ical_parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v retrieving revision 1.264 retrieving revision 1.265 diff -C2 -d -r1.264 -r1.265 *** ical_parser.php 12 May 2010 19:30:01 -0000 1.264 --- ical_parser.php 12 May 2010 19:32:37 -0000 1.265 *************** *** 103,107 **** * - Once to get the timezone information * - And again to collect the remaining data ! * See: http://phpicalendar.net/forums/viewtopic.php?f=45&t=4140&#p14451 */ $filename = tempnam(sys_get_temp_dir(), 'ICS'); --- 103,107 ---- * - Once to get the timezone information * - And again to collect the remaining data ! * See: http://phpicalendar.net/forums/viewtopic.php?f=45&t=4140#p14451 */ $filename = tempnam(sys_get_temp_dir(), 'ICS'); |
From: <par...@us...> - 2010-05-12 19:30:11
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv4540/functions Modified Files: ical_parser.php Log Message: Revert the change that removed parse_tzs.php, and fix it to copy webcals to a local temporary file. Index: ical_parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v retrieving revision 1.263 retrieving revision 1.264 diff -C2 -d -r1.263 -r1.264 *** ical_parser.php 19 Apr 2010 14:47:56 -0000 1.263 --- ical_parser.php 12 May 2010 19:30:01 -0000 1.264 *************** *** 14,18 **** sort($cal_filelist); $filename = sha1(implode(',', $cal_filelist)); ! $parsedcal = "{$phpiCal_config->tmp_dir}/parsedcal-{$filename}-{$this_year}"; if (file_exists($parsedcal)) { $fd = fopen($parsedcal, 'r'); --- 14,18 ---- sort($cal_filelist); $filename = sha1(implode(',', $cal_filelist)); ! $parsedcal = $phpiCal_config->tmp_dir . '/parsedcal-' . $filename . '-' . $this_year; if (file_exists($parsedcal)) { $fd = fopen($parsedcal, 'r'); *************** *** 47,51 **** $realcal_mtime = $mtime; } ! // If this calendar is up-to-date, the $y magic number will be incremented... if ($mtime >= $realcal_mtime) { --- 47,51 ---- $realcal_mtime = $mtime; } ! // If this calendar is up-to-date, the $y magic number will be incremented... if ($mtime >= $realcal_mtime) { *************** *** 76,80 **** } ! if ($parse_file) { $overlap_array = array (); $uid_counter = 0; --- 76,80 ---- } ! if ($parse_file) { $overlap_array = array (); $uid_counter = 0; *************** *** 83,92 **** $calnumber = 1; foreach ($cal_filelist as $cal_key=>$filename) { ! // Find the real name of the calendar. $actual_calname = getCalendarName($filename); ! ! if ($parse_file) { ! // Let's see if we're doing a webcal if (substr($filename, 0, 7) == 'http://' || substr($filename, 0, 8) == 'https://' || substr($filename, 0, 9) == 'webcal://') { --- 83,92 ---- $calnumber = 1; foreach ($cal_filelist as $cal_key=>$filename) { ! // Find the real name of the calendar. $actual_calname = getCalendarName($filename); ! ! if ($parse_file) { ! // Let's see if we're doing a webcal if (substr($filename, 0, 7) == 'http://' || substr($filename, 0, 8) == 'https://' || substr($filename, 0, 9) == 'webcal://') { *************** *** 94,122 **** $cal_httpPrefix = str_replace(array('webcal://', 'https://'), 'http://', $filename); $cal_httpsPrefix = str_replace(array('http://', 'webcal://'), 'https://', $filename); ! $filename = $cal_httpPrefix; $master_array['-4'][$calnumber]['webcal'] = 'yes'; ! $actual_mtime = remote_filemtime($filename); } else { $actual_mtime = filemtime($filename); } ! $is_std = false; ! $is_daylight = false; - $ifile = @fopen($filename, 'r'); if ($ifile == FALSE) exit(error($lang['l_error_cantopen'], $filename)); $nextline = fgets($ifile, 1024); #if (trim($nextline) != 'BEGIN:VCALENDAR') exit(error($lang['l_error_invalidcal'], $filename)); ! // Set a value so we can check to make sure $master_array contains valid data $master_array['-1'] = 'valid cal file'; ! // Set default calendar name - can be overridden by X-WR-CALNAME $calendar_name = $cal_filename; $master_array['calendar_name'] = $calendar_name; ! ! // read file in line by line ! // XXX end line is skipped because of the 1-line readahead while (!feof($ifile)) { $line = $nextline; --- 94,132 ---- $cal_httpPrefix = str_replace(array('webcal://', 'https://'), 'http://', $filename); $cal_httpsPrefix = str_replace(array('http://', 'webcal://'), 'https://', $filename); ! $master_array['-4'][$calnumber]['webcal'] = 'yes'; ! $actual_mtime = remote_filemtime($cal_httpPrefix); ! ! /* ! * We want to copy the remote calendar to a local temporary file, ! * because the current parser will read it twice: ! * - Once to get the timezone information ! * - And again to collect the remaining data ! * See: http://phpicalendar.net/forums/viewtopic.php?f=45&t=4140&#p14451 ! */ ! $filename = tempnam(sys_get_temp_dir(), 'ICS'); ! if (copy($cal_httpPrefix, $filename) === FALSE) { ! exit(error($lang['l_copy_error'], $cal_httpPrefix)); ! } } else { $actual_mtime = filemtime($filename); } ! include(BASE.'functions/parse/parse_tzs.php'); $ifile = @fopen($filename, 'r'); if ($ifile == FALSE) exit(error($lang['l_error_cantopen'], $filename)); $nextline = fgets($ifile, 1024); #if (trim($nextline) != 'BEGIN:VCALENDAR') exit(error($lang['l_error_invalidcal'], $filename)); ! // Set a value so we can check to make sure $master_array contains valid data $master_array['-1'] = 'valid cal file'; ! // Set default calendar name - can be overridden by X-WR-CALNAME $calendar_name = $cal_filename; $master_array['calendar_name'] = $calendar_name; ! ! // read file in line by line ! // XXX end line is skipped because of the 1-line readahead while (!feof($ifile)) { $line = $nextline; *************** *** 133,172 **** $line = trim(stripslashes($line)); switch ($line) { - // Begin VTIMEZONE Parsing - // - case 'BEGIN:VTIMEZONE': - unset($tz_name, $offset_from, $offset_to, $tz_id); - break; - case 'BEGIN:STANDARD': - unset ($offset_s); - $is_std = true; - $is_daylight = false; - break; - case 'END:STANDARD': - $offset_s = $offset_to; - $is_std = false; - break; - case 'BEGIN:DAYLIGHT': - unset ($offset_d); - $is_daylight = true; - $is_std = false; - break; - case 'END:DAYLIGHT': - $offset_d = $offset_to; - $is_daylight = false; - break; - case 'END:VTIMEZONE': - if (!isset($offset_d) && isset($offset_s)) $offset_d = $offset_s; - $tz_array[$tz_id] = array( - 0 => @$offset_s, - 1 => @$offset_d, - 'dt_start' => @$begin_daylight, - 'st_start' => @$begin_std, - 'st_name' => @$st_name, - 'dt_name' => @$dt_name - - ); #echo "<pre>$tz_id"; print_r($tz_array[$tz_id]);echo"</pre>"; - break; - // Begin VFREEBUSY/VEVENT Parsing // --- 143,146 ---- *************** *** 175,189 **** // each of these vars were being set to an empty string unset ( ! $start_time, $end_time, $start_date, $end_date, ! $allday_start, $allday_end, $start, $end, $the_duration, $beginning, $start_of_vevent, ! $valarm_description, $start_unixtime, $end_unixtime, $display_end_tmp, $end_time_tmp1, $recurrence_id, $recurrence_d, $recurrence_, $uid, $rrule, $until_check, ! $until, $byweek, $byweekno, $byminute, $byhour, $bysecond ); ! ! $interval = 1; ! $sequence = 0; $summary = ''; $description = ''; --- 149,163 ---- // each of these vars were being set to an empty string unset ( ! $start_time, $end_time, $start_date, $end_date, ! $allday_start, $allday_end, $start, $end, $the_duration, $beginning, $start_of_vevent, ! $valarm_description, $start_unixtime, $end_unixtime, $display_end_tmp, $end_time_tmp1, $recurrence_id, $recurrence_d, $recurrence_, $uid, $rrule, $until_check, ! $until, $byweek, $byweekno, $byminute, $byhour, $bysecond ); ! ! $interval = 1; ! $sequence = 0; $summary = ''; $description = ''; *************** *** 197,201 **** $wkst = 'MO'; $vtodo_categories = ''; ! $except_dates = array(); $except_times = array(); --- 171,175 ---- $wkst = 'MO'; $vtodo_categories = ''; ! $except_dates = array(); $except_times = array(); *************** *** 211,215 **** $attendee = array(); $organizer = array(); ! break; case 'END:VFREEBUSY': --- 185,189 ---- $attendee = array(); $organizer = array(); ! break; case 'END:VFREEBUSY': *************** *** 223,232 **** if (($vtodo_priority == '') && ($status == 'COMPLETED')) { $vtodo_sort = 11; ! } elseif ($vtodo_priority == '') { $vtodo_sort = 10; } else { $vtodo_sort = $vtodo_priority; } ! // CLASS support if (isset($class)) { --- 197,206 ---- if (($vtodo_priority == '') && ($status == 'COMPLETED')) { $vtodo_sort = 11; ! } elseif ($vtodo_priority == '') { $vtodo_sort = 10; } else { $vtodo_sort = $vtodo_priority; } ! // CLASS support if (isset($class)) { *************** *** 239,256 **** } } ! $master_array['-2']["$vtodo_sort"]["$uid"] = array ( ! 'start_date' => $start_date, ! 'start_time' => $start_time, ! 'vtodo_text' => $summary, ! 'due_date'=> $due_date, ! 'due_time'=> $due_time, ! 'completed_date' => $completed_date, ! 'completed_time' => $completed_time, ! 'priority' => $vtodo_priority, ! 'status' => $status, ! 'class' => $class, ! 'categories' => $vtodo_categories, ! 'description' => $description, 'calname' => $actual_calname, 'geo' => $geo, --- 213,230 ---- } } ! $master_array['-2']["$vtodo_sort"]["$uid"] = array ( ! 'start_date' => $start_date, ! 'start_time' => $start_time, ! 'vtodo_text' => $summary, ! 'due_date'=> $due_date, ! 'due_time'=> $due_time, ! 'completed_date' => $completed_date, ! 'completed_time' => $completed_time, ! 'priority' => $vtodo_priority, ! 'status' => $status, ! 'class' => $class, ! 'categories' => $vtodo_categories, ! 'description' => $description, 'calname' => $actual_calname, 'geo' => $geo, *************** *** 258,264 **** ); unset ($start_date, $start_time, $due_date, $due_time, $completed_date, $completed_time, $vtodo_priority, $status, $class, $vtodo_categories, $summary, $description); ! $vtodo_set = FALSE; break; ! case 'BEGIN:VTODO': $vtodo_set = TRUE; --- 232,238 ---- ); unset ($start_date, $start_time, $due_date, $due_time, $completed_date, $completed_time, $vtodo_priority, $status, $class, $vtodo_categories, $summary, $description); ! $vtodo_set = FALSE; break; ! case 'BEGIN:VTODO': $vtodo_set = TRUE; *************** *** 285,291 **** $valarm_set = FALSE; break; ! default: - unset ($field, $data, $prop_pos, $property); if (ereg ("([^:]+):(.*)", $line, $line)){ --- 259,264 ---- $valarm_set = FALSE; break; ! default: unset ($field, $data, $prop_pos, $property); if (ereg ("([^:]+):(.*)", $line, $line)){ *************** *** 295,318 **** $prop_pos = strpos($property,';'); if ($prop_pos !== false) $property = substr($property,0,$prop_pos); - - switch ($property) { - // Start TZ Parsing - // - case 'TZID': - $tz_id = $data; - break; - case 'TZOFFSETFROM': - $offset_from = $data; - break; - case 'TZOFFSETTO': - $offset_to = $data; - break; - case 'TZNAME': - if ($is_std) $st_name = $data; - if ($is_daylight) $dt_name = $data; - break; - // - // End TZ Parsing // Start VTODO Parsing // --- 268,273 ---- $prop_pos = strpos($property,';'); if ($prop_pos !== false) $property = substr($property,0,$prop_pos); + switch ($property) { // Start VTODO Parsing // *************** *** 322,326 **** $due_time = $datetime[2]; break; ! case 'COMPLETED': $datetime = extractDateTime($data, $property, $field); --- 277,281 ---- $due_time = $datetime[2]; break; ! case 'COMPLETED': $datetime = extractDateTime($data, $property, $field); *************** *** 328,336 **** $completed_time = $datetime[2]; break; ! case 'PRIORITY': $vtodo_priority = "$data"; break; ! case 'STATUS': $status = "$data"; --- 283,291 ---- $completed_time = $datetime[2]; break; ! case 'PRIORITY': $vtodo_priority = "$data"; break; ! case 'STATUS': $status = "$data"; *************** *** 340,348 **** $geo = "$data"; break; ! case 'CLASS': $class = "$data"; break; ! case 'CATEGORIES': $vtodo_categories = "$data"; --- 295,303 ---- $geo = "$data"; break; ! case 'CLASS': $class = "$data"; break; ! case 'CATEGORIES': $vtodo_categories = "$data"; *************** *** 350,376 **** // // End VTODO Parsing ! case 'DTSTART': $datetime = extractDateTime($data, $property, $field); $start_unixtime = $datetime[0]; $start_date = $datetime[1]; ! if ($is_std || $is_daylight) { ! $year = substr($start_date, 0, 4); ! if ($is_std) $begin_std[$year] = $data; ! if ($is_daylight) $begin_daylight[$year] = $data; ! } ! else { ! $start_time = $datetime[2]; ! $allday_start = $datetime[3]; ! $start_tz = $datetime[4]; ! preg_match ('/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{0,2})([0-9]{0,2})/', $data, $regs); ! $vevent_start_date = $regs[1] . $regs[2] . $regs[3]; ! $day_offset = dayCompare($start_date, $vevent_start_date); ! #echo date("Ymd Hi", $start_unixtime)." $start_date $start_time $vevent_start_date $day_offset<br>"; ! } break; ! case 'DTEND': ! $datetime = extractDateTime($data, $property, $field); $end_unixtime = $datetime[0]; $end_date = $datetime[1]; --- 305,324 ---- // // End VTODO Parsing ! case 'DTSTART': $datetime = extractDateTime($data, $property, $field); $start_unixtime = $datetime[0]; $start_date = $datetime[1]; ! $start_time = $datetime[2]; ! $allday_start = $datetime[3]; ! $start_tz = $datetime[4]; ! preg_match ('/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{0,2})([0-9]{0,2})/', $data, $regs); ! $vevent_start_date = $regs[1] . $regs[2] . $regs[3]; ! $day_offset = dayCompare($start_date, $vevent_start_date); ! #echo date("Ymd Hi", $start_unixtime)." $start_date $start_time $vevent_start_date $day_offset<br>"; break; ! case 'DTEND': ! $datetime = extractDateTime($data, $property, $field); $end_unixtime = $datetime[0]; $end_date = $datetime[1]; *************** *** 378,382 **** $allday_end = $datetime[3]; break; ! case 'EXDATE': $data = split(',', $data); --- 326,330 ---- $allday_end = $datetime[3]; break; ! case 'EXDATE': $data = split(',', $data); *************** *** 387,391 **** $except_dates[] = $regs[1] . $regs[2] . $regs[3]; // Added for Evolution, since they dont think they need to tell me which time to exclude. ! if ($regs[4] == '' && isset($start_time) && $start_time != '') { $except_times[] = $start_time; } else { --- 335,339 ---- $except_dates[] = $regs[1] . $regs[2] . $regs[3]; // Added for Evolution, since they dont think they need to tell me which time to exclude. ! if ($regs[4] == '' && isset($start_time) && $start_time != '') { $except_times[] = $start_time; } else { *************** *** 394,403 **** } break; ! case 'SUMMARY': $data = str_replace('$', '$', $data); $data = stripslashes($data); $data = htmlentities(urlencode($data)); ! if ($valarm_set == FALSE) { $summary = $data; } else { --- 342,351 ---- } break; ! case 'SUMMARY': $data = str_replace('$', '$', $data); $data = stripslashes($data); $data = htmlentities(urlencode($data)); ! if ($valarm_set == FALSE) { $summary = $data; } else { *************** *** 405,414 **** } break; ! case 'DESCRIPTION': $data = str_replace('$', '$', $data); $data = stripslashes($data); $data = htmlentities(urlencode($data)); ! if ($valarm_set == FALSE) { $description = $data; } else { --- 353,362 ---- } break; ! case 'DESCRIPTION': $data = str_replace('$', '$', $data); $data = stripslashes($data); $data = htmlentities(urlencode($data)); ! if ($valarm_set == FALSE) { $description = $data; } else { *************** *** 416,420 **** } break; ! case 'RECURRENCE-ID': $parts = explode(';', $field); --- 364,368 ---- } break; ! case 'RECURRENCE-ID': $parts = explode(';', $field); *************** *** 434,438 **** } unset($parts, $part, $eachval); ! $data = str_replace('T', '', $data); $data = str_replace('Z', '', $data); --- 382,386 ---- } unset($parts, $part, $eachval); ! $data = str_replace('T', '', $data); $data = str_replace('Z', '', $data); *************** *** 440,448 **** $recurrence_id['date'] = $regs[1] . $regs[2] . $regs[3]; $recurrence_id['time'] = $regs[4] . $regs[5]; ! $recur_unixtime = mktime($regs[4], $regs[5], 0, $regs[2], $regs[3], $regs[1]); ! if (isset($recurrence_id['tzid'])) { ! $offset_tmp = chooseOffset($recur_unixtime, $recurrence_id['tzid']); } elseif (isset($calendar_tz)) { $offset_tmp = chooseOffset($recur_unixtime, $calendar_tz); --- 388,396 ---- $recurrence_id['date'] = $regs[1] . $regs[2] . $regs[3]; $recurrence_id['time'] = $regs[4] . $regs[5]; ! $recur_unixtime = mktime($regs[4], $regs[5], 0, $regs[2], $regs[3], $regs[1]); ! if (isset($recurrence_id['tzid'])) { ! $offset_tmp = chooseOffset($recur_unixtime, $recurrence_id['tzid']); } elseif (isset($calendar_tz)) { $offset_tmp = chooseOffset($recur_unixtime, $calendar_tz); *************** *** 457,461 **** unset($server_offset_tmp); break; ! case 'SEQUENCE': $sequence = $data; --- 405,409 ---- unset($server_offset_tmp); break; ! case 'SEQUENCE': $sequence = $data; *************** *** 475,487 **** case 'DURATION': if (($first_duration == TRUE) && (!stristr($field, '=DURATION'))) { ! ereg ('^P([0-9]{1,2}[W])?([0-9]{1,3}[D])?([T]{0,1})?([0-9]{1,2}[H])?([0-9]{1,2}[M])?([0-9]{1,2}[S])?', $data, $duration); ! $weeks = str_replace('W', '', $duration[1]); ! $days = str_replace('D', '', $duration[2]); ! $hours = str_replace('H', '', $duration[4]); ! $minutes = str_replace('M', '', $duration[5]); ! $seconds = str_replace('S', '', $duration[6]); $the_duration = ($weeks * 60 * 60 * 24 * 7) + ($days * 60 * 60 * 24) + ($hours * 60 * 60) + ($minutes * 60) + ($seconds); $first_duration = FALSE; ! } break; case 'RRULE': --- 423,435 ---- case 'DURATION': if (($first_duration == TRUE) && (!stristr($field, '=DURATION'))) { ! ereg ('^P([0-9]{1,2}[W])?([0-9]{1,3}[D])?([T]{0,1})?([0-9]{1,2}[H])?([0-9]{1,2}[M])?([0-9]{1,2}[S])?', $data, $duration); ! $weeks = str_replace('W', '', $duration[1]); ! $days = str_replace('D', '', $duration[2]); ! $hours = str_replace('H', '', $duration[4]); ! $minutes = str_replace('M', '', $duration[5]); ! $seconds = str_replace('S', '', $duration[6]); $the_duration = ($weeks * 60 * 60 * 24 * 7) + ($days * 60 * 60 * 24) + ($hours * 60 * 60) + ($minutes * 60) + ($seconds); $first_duration = FALSE; ! } break; case 'RRULE': *************** *** 542,546 **** } } ! } } if (!isset($master_array['-3'][$calnumber])) $master_array['-3'][$calnumber] = $actual_calname; --- 490,500 ---- } } ! } ! fclose($ifile); ! ! // Delete the temporary file created for webcals ! if (@$master_array['-4'][$calnumber]['webcal'] == 'yes') { ! unlink($filename); ! } } if (!isset($master_array['-3'][$calnumber])) $master_array['-3'][$calnumber] = $actual_calname; *************** *** 551,560 **** } ! if ($parse_file) { // Sort the array by absolute date. ! if (isset($master_array) && is_array($master_array)) { ksort($master_array); reset($master_array); ! // sort the sub (day) arrays so the times are in order foreach (array_keys($master_array) as $k) { --- 505,514 ---- } ! if ($parse_file) { // Sort the array by absolute date. ! if (isset($master_array) && is_array($master_array)) { ksort($master_array); reset($master_array); ! // sort the sub (day) arrays so the times are in order foreach (array_keys($master_array) as $k) { *************** *** 565,569 **** } } ! // write the new master array to the file if (isset($master_array) && is_array($master_array) && $phpiCal_config->save_parsed_cals == 'yes') { --- 519,523 ---- } } ! // write the new master array to the file if (isset($master_array) && is_array($master_array) && $phpiCal_config->save_parsed_cals == 'yes') { |
From: <par...@us...> - 2010-05-12 19:30:10
|
Update of /cvsroot/phpicalendar/phpicalendar/functions/parse In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv4540/functions/parse Added Files: parse_tzs.php Log Message: Revert the change that removed parse_tzs.php, and fix it to copy webcals to a local temporary file. |
From: <par...@us...> - 2010-05-12 15:44:45
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv30749/functions Modified Files: date_functions.php Log Message: Stop parsing headers when a timestamp is obtained, and refactor resolve_path() Index: date_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/date_functions.php,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** date_functions.php 12 May 2010 15:26:49 -0000 1.60 --- date_functions.php 12 May 2010 15:44:36 -0000 1.61 *************** *** 65,68 **** --- 65,69 ---- break; } + if ($result) break; } *************** *** 76,81 **** */ function resolve_path($url, $rel_path) { ! $uri = parse_url($url); $uri['proto'] = (isset($uri['proto']) ? $uri['proto'] : 'http://'); $uri['port'] = (isset($uri['port']) ? (':' . $uri['port']) : ''); --- 77,87 ---- */ function resolve_path($url, $rel_path) { ! if (parse_url($rel_path) !== FALSE) { ! // Path is a URL ! return $rel_path; ! } + // Path is relative to this domain + $uri = parse_url($url); $uri['proto'] = (isset($uri['proto']) ? $uri['proto'] : 'http://'); $uri['port'] = (isset($uri['port']) ? (':' . $uri['port']) : ''); *************** *** 86,101 **** ); ! if (parse_url($rel_path) === false) { ! // Path is relative to this domain ! $rel_path = str_replace('\\', '/', $rel_path); ! ! if ($rel_path{0} == '/') ! return $uri['proto'] . '://' . $auth . $uri['host'] . $uri['port'] . $rel_path; ! ! return $uri['proto'] . '://' . $auth . $uri['host'] . $uri['port'] . $uri['path'] . '/' . $rel_path; } ! // Path is absolute ! return $rel_path; } --- 92,103 ---- ); ! $rel_path = str_replace('\\', '/', $rel_path); ! if ($rel_path{0} == '/') { ! // Absolute path ! return $uri['proto'] . '://' . $auth . $uri['host'] . $uri['port'] . $rel_path; } ! // Relative path ! return $uri['proto'] . '://' . $auth . $uri['host'] . $uri['port'] . @$uri['path'] . '/' . $rel_path; } |
From: <par...@us...> - 2010-05-12 15:27:02
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv27145/functions Modified Files: date_functions.php Log Message: Fix a bug with URL query strings in the new remote_filemtime() Index: date_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/date_functions.php,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** date_functions.php 15 Apr 2010 17:53:18 -0000 1.59 --- date_functions.php 12 May 2010 15:26:49 -0000 1.60 *************** *** 26,34 **** ); $uri['port'] = isset($uri['port']) ? $uri['port'] : 80; ! $path = ( ! (isset($uri['path']) || isset($uri['query'])) ? ! (@$uri['path'] . @$uri['query']) : ! '/' ! ); $auth = ( (isset($uri['user']) || isset($uri['pass'])) ? --- 26,32 ---- ); $uri['port'] = isset($uri['port']) ? $uri['port'] : 80; ! $uri['path'] = isset($uri['path']) ? $uri['path'] : '/'; ! $uri['query'] = isset($uri['query']) ? ('?' . $uri['query']) : ''; ! $path = $uri['path'] . $uri['query']; $auth = ( (isset($uri['user']) || isset($uri['pass'])) ? |
From: <par...@us...> - 2010-04-19 14:48:05
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv8596/functions Modified Files: ical_parser.php Log Message: Simplify save_parsed_cals and correct even more filename bugs Index: ical_parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v retrieving revision 1.262 retrieving revision 1.263 diff -C2 -d -r1.262 -r1.263 *** ical_parser.php 16 Apr 2010 22:11:43 -0000 1.262 --- ical_parser.php 19 Apr 2010 14:47:56 -0000 1.263 *************** *** 12,106 **** $parse_file = true; if ($phpiCal_config->save_parsed_cals == 'yes') { ! if (count($cal_filelist) == count($all_calendars_combined)) { ! // This is a special case for "all calendars combined" ! $parsedcal = $phpiCal_config->tmp_dir.'/parsedcal-'.urlencode($cpath.'::'.$phpiCal_config->ALL_CALENDARS_COMBINED).'-'.$this_year; ! if (file_exists($parsedcal)) { ! $fd = fopen($parsedcal, 'r'); ! $contents = fread($fd, filesize($parsedcal)); ! fclose($fd); ! $master_array = unserialize($contents); ! $y=0; ! // Check the calendars' last-modified time to determine if any need to be re-parsed ! if (sizeof($master_array['-4']) == (sizeof($cal_filelist))) { ! foreach ($master_array['-4'] as $temp_array) { ! $mtime = $temp_array['mtime']; ! $fname = $temp_array['filename']; ! $wcalc = $temp_array['webcal']; ! if ($wcalc == 'no') { ! /* ! * Getting local file mtime is "fairly cheap" ! * (disk I/O is expensive, but *much* cheaper than going to the network for remote files) ! */ ! $realcal_mtime = filemtime($fname); ! } ! else if ((time() - $mtime) >= $phpiCal_config->webcal_hours * 60 * 60) { ! /* ! * We limit remote file mtime checks based on the magic webcal_hours config variable ! * This allows highly volatile web calendars to be cached for a period of time before ! * downloading them again ! */ ! $realcal_mtime = remote_filemtime($fname); ! } ! else { ! // This is our fallback, for the case where webcal_hours is taking effect ! $realcal_mtime = $mtime; ! } ! ! // If this calendar is up-to-date, the $y magic number will be incremented... ! if ($mtime >= $realcal_mtime) { ! $y++; ! } } ! ! foreach ($master_array['-3'] as $temp_array) { ! if (isset($temp_array) && $temp_array !='') $caldisplaynames[] = $temp_array; } ! ! // And the $y magic number is used here to determine if all calendars are up-to-date ! if ($y == sizeof($cal_filelist)) { ! if ($master_array['-1'] == 'valid cal file') { ! // At this point, all calendars are up-to-date, so we can simply used the pre-parsed data ! $parse_file = false; ! $calendar_name = $master_array['calendar_name']; ! if (isset($master_array['calendar_tz'])) ! $calendar_tz = $master_array['calendar_tz']; ! } } } - } - if ($parse_file == true) { - // We need to re-parse at least one calendar, so unset master_array - unset($master_array); - } - } else { - foreach ($cal_filelist as $filename) { - $parsedcal = $phpiCal_config->tmp_dir.'/parsedcal-'.urlencode($cpath.'::'.$filename).'-'.$this_year; - if (file_exists($parsedcal)) { - $parsedcal_mtime = filemtime($parsedcal); ! if (((time() - $parsedcal_mtime) >= $phpiCal_config->webcal_hours * 60 * 60) && ! (substr($filename, 0, 7) == 'http://' || substr($filename, 0, 8) == 'https://' || substr($filename, 0, 9) == 'webcal://')) { ! $realcal_mtime = remote_filemtime($filename); ! } ! else { ! $realcal_mtime = $parsedcal_mtime; ! } ! if ($parsedcal_mtime >= $realcal_mtime) { ! $fd = fopen($parsedcal, 'r'); ! $contents = fread($fd, filesize($parsedcal)); ! fclose($fd); ! $master_array = unserialize($contents); ! if ($master_array['-1'] == 'valid cal file') { ! $parse_file = false; ! $calendar_name = $master_array['calendar_name']; ! if (isset($master_array['calendar_tz'])) ! $calendar_tz = $master_array['calendar_tz']; ! } } } } } } --- 12,77 ---- $parse_file = true; if ($phpiCal_config->save_parsed_cals == 'yes') { ! sort($cal_filelist); ! $filename = sha1(implode(',', $cal_filelist)); ! $parsedcal = "{$phpiCal_config->tmp_dir}/parsedcal-{$filename}-{$this_year}"; ! if (file_exists($parsedcal)) { ! $fd = fopen($parsedcal, 'r'); ! $contents = fread($fd, filesize($parsedcal)); ! fclose($fd); ! $master_array = unserialize($contents); ! $y=0; ! // Check the calendars' last-modified time to determine if any need to be re-parsed ! if (count($master_array['-4']) == count($cal_filelist)) { ! foreach ($master_array['-4'] as $temp_array) { ! $mtime = $temp_array['mtime']; ! $fname = $temp_array['filename']; ! $wcalc = $temp_array['webcal']; ! if ($wcalc == 'no') { ! /* ! * Getting local file mtime is "fairly cheap" ! * (disk I/O is expensive, but *much* cheaper than going to the network for remote files) ! */ ! $realcal_mtime = filemtime($fname); } ! else if ((time() - $mtime) >= $phpiCal_config->webcal_hours * 60 * 60) { ! /* ! * We limit remote file mtime checks based on the magic webcal_hours config variable ! * This allows highly volatile web calendars to be cached for a period of time before ! * downloading them again ! */ ! $realcal_mtime = remote_filemtime($fname); } ! else { ! // This is our fallback, for the case where webcal_hours is taking effect ! $realcal_mtime = $mtime; ! } ! ! // If this calendar is up-to-date, the $y magic number will be incremented... ! if ($mtime >= $realcal_mtime) { ! $y++; } } ! foreach ($master_array['-3'] as $temp_array) { ! if (isset($temp_array) && $temp_array !='') $caldisplaynames[] = $temp_array; ! } ! // And the $y magic number is used here to determine if all calendars are up-to-date ! if ($y == count($cal_filelist)) { ! if ($master_array['-1'] == 'valid cal file') { ! // At this point, all calendars are up-to-date, so we can simply used the pre-parsed data ! $parse_file = false; ! $calendar_name = $master_array['calendar_name']; ! if (isset($master_array['calendar_tz'])) ! $calendar_tz = $master_array['calendar_tz']; } } } } + if ($parse_file == true) { + // We need to re-parse at least one calendar, so unset master_array + unset($master_array); + } } *************** *** 602,606 **** @fwrite($fd, $write_me); @fclose($fd); - @touch($parsedcal, $realcal_mtime); @chmod($parsedcal, 0600); // 0640 } --- 573,576 ---- |
From: <par...@us...> - 2010-04-16 22:11:53
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv15824/functions Modified Files: ical_parser.php Log Message: Fix save_parsed_cals using wrong filenames Index: ical_parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v retrieving revision 1.261 retrieving revision 1.262 diff -C2 -d -r1.261 -r1.262 *** ical_parser.php 16 Apr 2010 19:02:36 -0000 1.261 --- ical_parser.php 16 Apr 2010 22:11:43 -0000 1.262 *************** *** 76,80 **** } else { foreach ($cal_filelist as $filename) { ! $parsedcal = $phpiCal_config->tmp_dir.'/parsedcal-'.urlencode($cpath.'::'.$cal_filename).'-'.$this_year; if (file_exists($parsedcal)) { $parsedcal_mtime = filemtime($parsedcal); --- 76,80 ---- } else { foreach ($cal_filelist as $filename) { ! $parsedcal = $phpiCal_config->tmp_dir.'/parsedcal-'.urlencode($cpath.'::'.$filename).'-'.$this_year; if (file_exists($parsedcal)) { $parsedcal_mtime = filemtime($parsedcal); |
From: <par...@us...> - 2010-04-16 19:30:47
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14972/functions Modified Files: draw_functions.php Log Message: Revert changes to draw_functions.php Index: draw_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/draw_functions.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** draw_functions.php 15 Apr 2010 20:36:14 -0000 1.11 --- draw_functions.php 16 Apr 2010 19:30:39 -0000 1.12 *************** *** 32,41 **** } } ! $sta = ($sta_h * 60 + $sta_min); ! $end = ($end_h * 60 + $end_min); ! if ($sta < $end) ! $draw_len = $end - $sta; ! else ! $draw_len = $sta - $end; return array ("draw_start" => ($sta_h . $sta_min), "draw_end" => ($end_h . $end_min), "draw_length" => $draw_len); --- 32,36 ---- } } ! $draw_len = ($end_h * 60 + $end_min) - ($sta_h * 60 + $sta_min); return array ("draw_start" => ($sta_h . $sta_min), "draw_end" => ($end_h . $end_min), "draw_length" => $draw_len); |
From: <par...@us...> - 2010-04-16 19:10:25
|
Update of /cvsroot/phpicalendar/phpicalendar/functions/parse In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv10324/functions/parse Modified Files: end_vevent.php overlapping_events.php Log Message: Better fix for Bug 2968512 Index: end_vevent.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/parse/end_vevent.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** end_vevent.php 8 Jul 2009 18:28:13 -0000 1.27 --- end_vevent.php 16 Apr 2010 19:10:17 -0000 1.28 *************** *** 327,331 **** 'event_start' => $start_time, # hhmm 'event_end' => $end_time, # hhmm ! 'display_end' => $display_end_tmp, # hhmm display_start is $time_key 'start_unixtime' => $start_unixtime_tmp, # start unixtime for this recurrence 'end_unixtime' => $end_unixtime_tmp, # end unixtime for this recurrence --- 327,332 ---- 'event_start' => $start_time, # hhmm 'event_end' => $end_time, # hhmm ! 'display_start' => $time_key, # hhmm ! 'display_end' => $display_end_tmp, # hhmm 'start_unixtime' => $start_unixtime_tmp, # start unixtime for this recurrence 'end_unixtime' => $end_unixtime_tmp, # end unixtime for this recurrence Index: overlapping_events.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/parse/overlapping_events.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** overlapping_events.php 15 Apr 2010 20:36:15 -0000 1.5 --- overlapping_events.php 16 Apr 2010 19:10:17 -0000 1.6 *************** *** 139,147 **** // Copy out the array - we replace this at the end. $ol_day_array = @$overlap_array[$event_date]; ! $draw_end = $event['event_end']; ! if (isset($event['display_end'])) $draw_end = $event['display_end']; ! $drawTimes = drawEventTimes($event['event_start'], $draw_end, ($event['event_length'] >= (60*60*24))); ! if ($event_time == "0000") $drawTimes['draw_start'] = "0000"; ! if ($draw_end == "2400") $drawTimes['draw_end'] = "2400"; // Track if $event has been merged in, so we don't re-add the details to 'event' or 'overlapRanges' multiple times. --- 139,143 ---- // Copy out the array - we replace this at the end. $ol_day_array = @$overlap_array[$event_date]; ! $drawTimes = drawEventTimes($event['display_start'], $event['display_end'], ($event['event_length'] >= (60*60*24))); // Track if $event has been merged in, so we don't re-add the details to 'event' or 'overlapRanges' multiple times. *************** *** 183,189 **** // Make sure we haven't already dealt with the event, and we're not checking against ourself. if ($loop_event['event_overlap'] == 0 && $loop_event_key != $uid) { ! $loopDrawTimes = drawEventTimes($loop_event['event_start'], $loop_event['display_end'], ($loop_event['event_length'] >= (60*60*24))); ! if ($event_time == "0000") $loopDrawTimes['draw_start'] = "0000"; ! if ($draw_end == "2400") $loopDrawTimes['draw_end'] = "2400"; if ($loopDrawTimes['draw_start'] < $drawTimes['draw_end'] && $loopDrawTimes['draw_end'] > $drawTimes['draw_start']) { if ($loopDrawTimes['draw_start'] < $drawTimes['draw_start']) { --- 179,183 ---- // Make sure we haven't already dealt with the event, and we're not checking against ourself. if ($loop_event['event_overlap'] == 0 && $loop_event_key != $uid) { ! $loopDrawTimes = drawEventTimes($loop_event['display_start'], $loop_event['display_end'], ($loop_event['event_length'] >= (60*60*24))); if ($loopDrawTimes['draw_start'] < $drawTimes['draw_end'] && $loopDrawTimes['draw_end'] > $drawTimes['draw_start']) { if ($loopDrawTimes['draw_start'] < $drawTimes['draw_start']) { |
From: <par...@us...> - 2010-04-16 19:02:44
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv8207/functions Modified Files: ical_parser.php init.inc.php Log Message: Fix calendar selection bug assuming "All Calendars Combined" Index: ical_parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v retrieving revision 1.260 retrieving revision 1.261 diff -C2 -d -r1.260 -r1.261 *** ical_parser.php 15 Apr 2010 19:39:54 -0000 1.260 --- ical_parser.php 16 Apr 2010 19:02:36 -0000 1.261 *************** *** 12,16 **** $parse_file = true; if ($phpiCal_config->save_parsed_cals == 'yes') { ! if (sizeof ($cal_filelist) > 1) { // This is a special case for "all calendars combined" $parsedcal = $phpiCal_config->tmp_dir.'/parsedcal-'.urlencode($cpath.'::'.$phpiCal_config->ALL_CALENDARS_COMBINED).'-'.$this_year; --- 12,16 ---- $parse_file = true; if ($phpiCal_config->save_parsed_cals == 'yes') { ! if (count($cal_filelist) == count($all_calendars_combined)) { // This is a special case for "all calendars combined" $parsedcal = $phpiCal_config->tmp_dir.'/parsedcal-'.urlencode($cpath.'::'.$phpiCal_config->ALL_CALENDARS_COMBINED).'-'.$this_year; Index: init.inc.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/init.inc.php,v retrieving revision 1.123 retrieving revision 1.124 diff -C2 -d -r1.123 -r1.124 *** init.inc.php 18 Jun 2009 16:21:46 -0000 1.123 --- init.inc.php 16 Apr 2010 19:02:36 -0000 1.124 *************** *** 49,55 **** } //load cal_filenames if $ALL_CALENDARS_COMBINED if ($cal_filenames[0] == $phpiCal_config->ALL_CALENDARS_COMBINED){ ! $cal_filenames = availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED); } // Separate the calendar identifiers into web calendars and local --- 49,57 ---- } + $all_calendars_combined = availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED); + //load cal_filenames if $ALL_CALENDARS_COMBINED if ($cal_filenames[0] == $phpiCal_config->ALL_CALENDARS_COMBINED){ ! $cal_filenames = $all_calendars_combined; } // Separate the calendar identifiers into web calendars and local |
From: <par...@us...> - 2010-04-15 20:40:30
|
Update of /cvsroot/phpicalendar/phpicalendar In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv23583 Modified Files: README Log Message: Update README Index: README =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/README,v retrieving revision 1.122 retrieving revision 1.123 diff -C2 -d -r1.122 -r1.123 *** README 15 Apr 2010 19:39:53 -0000 1.122 --- README 15 Apr 2010 20:40:22 -0000 1.123 *************** *** 108,111 **** --- 108,112 ---- Navigation forms breaking PHP transparent SID Fix strange characters displayed in Locations with % characters + Fix Bug 2968512 - wrong display in week view, events shifted New features: Event information displayed with Nice Titles |
From: <par...@us...> - 2010-04-15 20:36:23
|
Update of /cvsroot/phpicalendar/phpicalendar/functions/parse In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv21961/functions/parse Modified Files: overlapping_events.php Log Message: Fix overlapping events, Bug #2968512 Index: overlapping_events.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/parse/overlapping_events.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** overlapping_events.php 8 Jul 2009 18:28:13 -0000 1.4 --- overlapping_events.php 15 Apr 2010 20:36:15 -0000 1.5 *************** *** 111,115 **** // Builds $overlap_array structure, and updates event_overlap in $master_array for the given events. // For a given date, ! // - check to see if the event's already in a block, and if so, add it. // - make sure the new block doesn't overlap another block, and if so, merge the blocks. // - check that there aren't any events we already passed that we should handle. --- 111,115 ---- // Builds $overlap_array structure, and updates event_overlap in $master_array for the given events. // For a given date, ! // - check to see if the event's already in a block, and if so, add it. // - make sure the new block doesn't overlap another block, and if so, merge the blocks. // - check that there aren't any events we already passed that we should handle. *************** *** 183,187 **** // Make sure we haven't already dealt with the event, and we're not checking against ourself. if ($loop_event['event_overlap'] == 0 && $loop_event_key != $uid) { ! $loopDrawTimes = drawEventTimes($loop_event['event_start'], $loop_event['display_end']); if ($loopDrawTimes['draw_start'] < $drawTimes['draw_end'] && $loopDrawTimes['draw_end'] > $drawTimes['draw_start']) { if ($loopDrawTimes['draw_start'] < $drawTimes['draw_start']) { --- 183,189 ---- // Make sure we haven't already dealt with the event, and we're not checking against ourself. if ($loop_event['event_overlap'] == 0 && $loop_event_key != $uid) { ! $loopDrawTimes = drawEventTimes($loop_event['event_start'], $loop_event['display_end'], ($loop_event['event_length'] >= (60*60*24))); ! if ($event_time == "0000") $loopDrawTimes['draw_start'] = "0000"; ! if ($draw_end == "2400") $loopDrawTimes['draw_end'] = "2400"; if ($loopDrawTimes['draw_start'] < $drawTimes['draw_end'] && $loopDrawTimes['draw_end'] > $drawTimes['draw_start']) { if ($loopDrawTimes['draw_start'] < $drawTimes['draw_start']) { |