aboutsummaryrefslogtreecommitdiffstats
path: root/functions/template.php
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2005-05-05 07:07:50 +0000
committerJim Hu <jimhu@users.sourceforge.net>2005-05-05 07:07:50 +0000
commiteca49b206b86360109f31d465b2ae9abd926dd70 (patch)
tree15a79e08e076e2a0cdd4db1015c225fb45600f03 /functions/template.php
parent116f71c54a87243426da1094c59d04a5713940d0 (diff)
downloadphpicalendar-eca49b206b86360109f31d465b2ae9abd926dd70.tar.gz
phpicalendar-eca49b206b86360109f31d465b2ae9abd926dd70.tar.bz2
phpicalendar-eca49b206b86360109f31d465b2ae9abd926dd70.zip
Dave Fallon's fix to display problem
Diffstat (limited to 'functions/template.php')
-rw-r--r--functions/template.php29
1 files changed, 16 insertions, 13 deletions
diff --git a/functions/template.php b/functions/template.php
index b8792e4..945e87d 100644
--- a/functions/template.php
+++ b/functions/template.php
@@ -368,17 +368,19 @@ class Page {
if ($day_start == $cal_time && isset($master_array[$thisday]) && is_array($master_array[$thisday])) {
foreach($master_array[$thisday] as $time_key => $time_arr) {
- if ((int)$time_key <= (int)$cal_time && is_array($time_arr) && $time_key != '-1') {
- foreach($time_arr as $event_tmp) {
- if ((int)$event_tmp['event_end'] > (int)$cal_time) {
- $this_time_arr[] = $event_tmp;
+ if ((int)$time_key <= (int)$cal_time) {
+ if (is_array($time_arr) && $time_key != '-1') {
+ foreach($time_arr as $uid => $event_tmp) {
+ if ((int)$event_tmp['event_end'] > (int)$cal_time) {
+ $this_time_arr[$uid] = $event_tmp;
+ }
}
}
} else {
- #break;
+ break;
}
}
- }else{
+ } else {
if (isset($master_array[$thisday][$cal_time]) && sizeof($master_array[$thisday][$cal_time]) > 0) {
$this_time_arr = $master_array[$thisday][$cal_time];
}
@@ -570,21 +572,22 @@ class Page {
$key = date ($timeFormat, $key);
unset($this_time_arr);
-
// add events that overlap $day_start instead of cutting them out completely
if (($day_start == $cal_time) && (isset($master_array[$getdate]))) {
foreach($master_array[$getdate] as $time_key => $time_arr) {
- if ((int)$time_key <= (int)$cal_time && is_array($time_arr) && $time_key != '-1') {
- foreach($time_arr as $event_tmp) {
- if ((int)$event_tmp['event_end'] > (int)$cal_time) {
- $this_time_arr[] = $event_tmp;
+ if ((int)$time_key <= (int)$cal_time) {
+ if (is_array($time_arr) && $time_key != '-1') {
+ foreach($time_arr as $uid => $event_tmp) {
+ if ((int)$event_tmp['event_end'] > (int)$cal_time) {
+ $this_time_arr[$uid] = $event_tmp;
+ }
}
}
} else {
- #break;
+ break;
}
}
- }else{
+ } else {
// add events that overlap the start time
if (isset($master_array[$getdate][$cal_time]) && sizeof($master_array[$getdate][$cal_time]) > 0) {
$this_time_arr = $master_array[$getdate][$cal_time];

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