I just uploaded a new version of template.php to the CVS:
This includes the changes to draw_search that I was having trouble
uploading a while ago, and also solves the problem with event display
noted by David Fallon. I ended up using a different solution than
David did - I think this is simpler, and it handles some problems I had
with his patch.
unset($this_time_arr);
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;
}
}
} else {
break;
}
}
}else{
if (isset($master_array[$thisday][$cal_time]) &&
sizeof($master_array[$thisday][$cal_time]) > 0) {
$this_time_arr = $master_array[$thisday][$cal_time];
}
}
the key changes are to
1 )flip the order of looking for early events and events that start
after the default start time
2) include the ones that match the default start time in the former
3) do the latter only if $cal_time != $day_start.
see:
http://dimer.tamu.edu/phpicalendar-2.0a/week.php?
cal=all_calendars_combined971&getdate=20050504
for working version with test calendars.
|