From: <ji...@us...> - 2008-12-28 19:30:47
|
Update of /cvsroot/phpicalendar/phpicalendar/functions/parse In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7568/functions/parse Modified Files: end_vevent.php parse_tzs.php recur_functions.php Log Message: fix misc bugs; rewrite some places where warnings squelched with @; require php5.1 or greater Index: end_vevent.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/parse/end_vevent.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** end_vevent.php 27 Dec 2008 11:42:41 -0000 1.19 --- end_vevent.php 28 Dec 2008 19:30:41 -0000 1.20 *************** *** 178,183 **** } } 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']; --- 178,184 ---- } } + # convert wkst to a 3 char day for strtotime to work + $wkst3char = two2threeCharDays($wkst); 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']; *************** *** 207,220 **** # conditions where we don't need to iterate over the whole range ! # if repeating without limit, and steps are by 1, don't go back before the mArray beginning. if($count == 1000000 && $interval == 1 && $mArray_begin > $next_range_unixtime) $next_range_unixtime = $mArray_begin; ! # if the beginning of our range is less than the start of the item, we may as well set the range to start at start_time if ($next_range_unixtime < $start_date_unixtime) $next_range_unixtime = $start_date_unixtime; ! # stop at the until limit if set if(isset($until) && $end_range_unixtime > $until_unixtime) $end_range_unixtime = $until_unixtime; ! # more adjustments switch ($freq_type){ case 'week': --- 208,221 ---- # conditions where we don't need to iterate over the whole range ! # if repeating without limit, and steps are by 1, don't go back before the mArray beginning. if($count == 1000000 && $interval == 1 && $mArray_begin > $next_range_unixtime) $next_range_unixtime = $mArray_begin; ! # if the beginning of our range is less than the start of the item, we may as well set the range to start at start_time if ($next_range_unixtime < $start_date_unixtime) $next_range_unixtime = $start_date_unixtime; ! # stop at the until limit if set if(isset($until) && $end_range_unixtime > $until_unixtime) $end_range_unixtime = $until_unixtime; ! # more adjustments switch ($freq_type){ case 'week': *************** *** 232,237 **** $count = 1; } - // convert wkst to a 3 char day for strtotime to work - $wkst3char = two2threeCharDays($wkst); /* The while loop below increments $next_range_time by $freq type. For the larger freq types, there is only --- 233,236 ---- Index: parse_tzs.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/parse/parse_tzs.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** parse_tzs.php 28 Dec 2008 10:51:49 -0000 1.8 --- parse_tzs.php 28 Dec 2008 19:30:41 -0000 1.9 *************** *** 1,5 **** <?php $ifile = @fopen($filename, "r"); ! if ($ifile == FALSE) exit(error($lang['l_error_cantopen']." parse_tz", $filename)); $nextline = fgets($ifile); if (trim($nextline) != 'BEGIN:VCALENDAR') exit(error($lang['l_error_invalidcal'], $filename)); --- 1,5 ---- <?php $ifile = @fopen($filename, "r"); ! if ($ifile == FALSE) exit(error($lang['l_error_cantopen'], $filename)); $nextline = fgets($ifile); if (trim($nextline) != 'BEGIN:VCALENDAR') exit(error($lang['l_error_invalidcal'], $filename)); Index: recur_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/parse/recur_functions.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** recur_functions.php 28 Dec 2008 10:50:58 -0000 1.16 --- recur_functions.php 28 Dec 2008 19:30:41 -0000 1.17 *************** *** 1,3 **** ! <?php /* from the std --- 1,3 ---- ! <?php /* from the std *************** *** 29,32 **** --- 29,33 ---- foreach ($times as $time){ #echo "time:". date("Ymd",$time)."\n"; + if (!isset($time) || $time == '') continue; $date = date("Ymd",$time); $time = strtotime("$date 12:00:00"); |