From 50ce9c8c7c7ac6b8c3137e84ec4da8a1bbe38a12 Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Mon, 29 Dec 2008 03:07:34 +0000 Subject: change handling of multiday allday events in week view; other misc changes --- functions/parse/recur_functions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'functions/parse/recur_functions.php') diff --git a/functions/parse/recur_functions.php b/functions/parse/recur_functions.php index e936c64..89d39b2 100644 --- a/functions/parse/recur_functions.php +++ b/functions/parse/recur_functions.php @@ -10,7 +10,7 @@ We will use two kinds of functions - those that restrict the date to allowed val function add_recur($times,$freq=''){ global $recur_data; - global $count, $mArray_begin, $mArray_end, $except_dates, $start_date, $start_date_unixtime,$end_range_unixtime, $day_offset, $current_view; + global $count, $mArray_begin, $mArray_end, $except_dates, $start_date, $start_date_unixtime,$end_range_unixtime,$until_unixtime, $day_offset, $current_view; if (!is_array($times)) $times = array($times); /* BYMONTH, BYWEEKNO, BYYEARDAY, BYMONTHDAY, BYDAY, BYHOUR, BYMINUTE, BYSECOND and BYSETPOS */ #dump_times($times); @@ -27,7 +27,7 @@ function add_recur($times,$freq=''){ } $until_date = date("Ymd",$end_range_unixtime); foreach ($times as $time){ - #echo "time:". date("Ymd",$time)."\n"; + #echo "time:". date("Ymd",$time)." $until_date
\n"; if (!isset($time) || $time == '') continue; $date = date("Ymd",$time); $time = strtotime("$date 12:00:00"); @@ -38,6 +38,7 @@ function add_recur($times,$freq=''){ && $time != '' && !in_array($time, $recur_data) && !in_array($date, $except_dates) + && $time <= $until_unixtime && $time >= $start_date_unixtime && $date <= $until_date ){ -- cgit v1.2.3