From 9b00469b471a8b159c60ecca333f0f7064ba1d27 Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Sat, 20 Dec 2008 03:22:54 +0000 Subject: misc error warnings and notices --- functions/parse/end_vevent.php | 5 +++-- functions/parse/recur_functions.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'functions/parse') diff --git a/functions/parse/end_vevent.php b/functions/parse/end_vevent.php index 88f94fa..e9e3064 100644 --- a/functions/parse/end_vevent.php +++ b/functions/parse/end_vevent.php @@ -11,6 +11,8 @@ What happens in this file: 3. Add occurrences to master_array */ +if (!isset($start_date)) echo "no start date for $summary
"; + // Handle DURATION if (!isset($end_unixtime)) { if(!isset($the_duration)) $the_duration = 0; @@ -132,7 +134,6 @@ foreach ($rrule_array as $key => $val) { $until = str_replace('T', '', $val); $until = str_replace('Z', '', $until); if (strlen($until) == 8) $until = $until.'235959'; - $abs_until = $until; ereg ('([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})', $until, $regs); $until_unixtime = mktime($regs[4],$regs[5],@$regs[6],$regs[2],$regs[3],$regs[1]); $recur_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = localizeDate($dateFormat_week,$until); @@ -330,7 +331,7 @@ foreach($recur_data as $recur_data_unixtime) { // Let's double check the until to not write past it $until_check = $start_date_tmp.$time_tmp.'00'; - if ($abs_until > $until_check) { + if (@$until > $until_check) { $master_array[$start_date_tmp][$time_tmp][$uid] = array ( 'event_start' => $start_time_tmp, 'event_end' => $end_time_tmp, diff --git a/functions/parse/recur_functions.php b/functions/parse/recur_functions.php index daf7399..c0ea88f 100644 --- a/functions/parse/recur_functions.php +++ b/functions/parse/recur_functions.php @@ -57,7 +57,7 @@ function add_recur($times,$freq=''){ } function expand_bymonth($time){ global $bymonth, $byweekno, $bymonthday, $year, $start_unixtime, $freq_type; - if(!empty($byweekno)) return $times; + if(!empty($byweekno)) return $time; if(empty($bymonth)) $bymonth = array(date("m", $start_unixtime)); $d = date("d",$start_unixtime); if (!empty($bymonthday)) $d = 1; -- cgit v1.2.3