aboutsummaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2017-02-20 18:06:01 +0100
committerDaniel Lange <DLange@git.local>2017-02-20 18:06:01 +0100
commit2d456c0e41e848705db325e461d0272f295f8a2f (patch)
treec05f12255290a7959a16538bb9aa29aef2fe902e /functions
parentac58b91d721abf1dc3320c9cabb37ee6f33c3398 (diff)
downloadphpicalendar-2d456c0e41e848705db325e461d0272f295f8a2f.tar.gz
phpicalendar-2d456c0e41e848705db325e461d0272f295f8a2f.tar.bz2
phpicalendar-2d456c0e41e848705db325e461d0272f295f8a2f.zip
Import repeat entry patch from Sourceforge #664
Diffstat (limited to 'functions')
-rw-r--r--functions/template.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/functions/template.php b/functions/template.php
index 95ebabf..17994da 100644
--- a/functions/template.php
+++ b/functions/template.php
@@ -79,9 +79,12 @@ class Page {
$some_events = '';
foreach ($val as $cal_time => $new_val) {
foreach ($new_val as $new_key2 => $new_val2) {
- if (isset($seen_events[$new_key2]) && isset($new_val2['spans_day']) && $new_val2['spans_day'] == 1){
- $new_val2['event_text'] .= ' second instance of '.$new_key2;
+ if (isset($seen_events[$new_key2])) {
+ // Include in list if we've already seen it AND
+ // (it spans more than one day OR it's a recurring event)
+ if (($new_val2['spans_day'] != 1) && (!isset($new_val2['recur']))) {
continue;
+ }
}
$seen_events[$new_key2] = 1;
$day_events++;
@@ -1091,7 +1094,13 @@ HEREDOC;
# $switch['START_DATE'] = localizeDate ($dateFormat_week_list, $u_start);
$start_date = localizeDate ($dateFormat_week_list, $u_start);
foreach ($event_times as $uid => $val) {
- if (isset($seen_events[$uid]) && @$val['spans_day'] == 1) continue;
+ if (isset($seen_events[$uid])) {
+ // Include in list if we've already seen it AND
+ // (it spans more than one day OR it's a recurring event)
+ if ((@$val['spans_day'] != 1) && (!isset($val['recur']))) {
+ continue;
+ }
+ }
$seen_events[$uid] = 1;
$switch['CAL'] = $cal;
$switch['START_DATE'] = $start_date;

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