aboutsummaryrefslogtreecommitdiffstats
path: root/functions/parse
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2008-12-26 08:26:31 +0000
committerJim Hu <jimhu@users.sourceforge.net>2008-12-26 08:26:31 +0000
commitb8cc4f61ed18ee4bb8fcedb5a836e7bab9ecbbe4 (patch)
treeab2d8af1f6fa3aadab110842f304d4bf7f6b5d5e /functions/parse
parent7d565474b41400bfce2d665da96d39631458eda3 (diff)
downloadphpicalendar-b8cc4f61ed18ee4bb8fcedb5a836e7bab9ecbbe4.tar.gz
phpicalendar-b8cc4f61ed18ee4bb8fcedb5a836e7bab9ecbbe4.tar.bz2
phpicalendar-b8cc4f61ed18ee4bb8fcedb5a836e7bab9ecbbe4.zip
expand search range;fix todo display
Diffstat (limited to 'functions/parse')
-rw-r--r--functions/parse/end_vevent.php1
-rw-r--r--functions/parse/recur_functions.php22
2 files changed, 13 insertions, 10 deletions
diff --git a/functions/parse/end_vevent.php b/functions/parse/end_vevent.php
index 80e1ce9..4c5c352 100644
--- a/functions/parse/end_vevent.php
+++ b/functions/parse/end_vevent.php
@@ -253,6 +253,7 @@ one $next_range_time per repeat, but the BYXXX rules may write more than one eve
$next_date_time handles those instances within a $freq_type */
#echo "<pre>$summary\n\tstart mArray time:".date("Ymd his",$mArray_begin)."\n\tnext_range_unixtime:".date("Ymd his",$next_range_unixtime)."\n\tend range time ".date("Ymd his",$end_range_unixtime)."\n";
$recur_data = array();
+if($current_view == 'search') $freq_type = 'none';
while ($next_range_unixtime <= $end_range_unixtime && $count > 0) {
$year = date("Y", $next_range_unixtime);
$month = date('m', $next_range_unixtime);
diff --git a/functions/parse/recur_functions.php b/functions/parse/recur_functions.php
index 2328e4b..8daa71d 100644
--- a/functions/parse/recur_functions.php
+++ b/functions/parse/recur_functions.php
@@ -10,19 +10,21 @@ 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;
+ global $count, $mArray_begin, $mArray_end, $except_dates, $start_date, $start_date_unixtime,$end_range_unixtime, $day_offset, $current_view;
if (!is_array($times)) $times = array($times);
/* BYMONTH, BYWEEKNO, BYYEARDAY, BYMONTHDAY, BYDAY, BYHOUR, BYMINUTE, BYSECOND and BYSETPOS */
#dump_times($times);
- $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);
+ 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)."\n";

© 2014-2024 Faster IT GmbH | imprint | privacy policy