diff options
author | Jason Oster <parasytic@users.sourceforge.net> | 2010-04-15 20:36:14 +0000 |
---|---|---|
committer | Jason Oster <parasytic@users.sourceforge.net> | 2010-04-15 20:36:14 +0000 |
commit | fcd43841ea9ad473348c386b9c6202948534a02b (patch) | |
tree | 5643fbd2b7f8faa0e266357961e55351e8054ec8 /functions/draw_functions.php | |
parent | ce0ebfc5272a8bb682f218d4d58d3d8d68e15f8a (diff) | |
download | phpicalendar-fcd43841ea9ad473348c386b9c6202948534a02b.tar.gz phpicalendar-fcd43841ea9ad473348c386b9c6202948534a02b.tar.bz2 phpicalendar-fcd43841ea9ad473348c386b9c6202948534a02b.zip |
Fix overlapping events, Bug #2968512
Diffstat (limited to 'functions/draw_functions.php')
-rw-r--r-- | functions/draw_functions.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/functions/draw_functions.php b/functions/draw_functions.php index 836d41f..c20e04c 100644 --- a/functions/draw_functions.php +++ b/functions/draw_functions.php @@ -31,7 +31,12 @@ function drawEventTimes ($start, $end, $long_event = FALSE) { $end_min = "00"; } } - $draw_len = ($end_h * 60 + $end_min) - ($sta_h * 60 + $sta_min); + $sta = ($sta_h * 60 + $sta_min); + $end = ($end_h * 60 + $end_min); + if ($sta < $end) + $draw_len = $end - $sta; + else + $draw_len = $sta - $end; return array ("draw_start" => ($sta_h . $sta_min), "draw_end" => ($end_h . $end_min), "draw_length" => $draw_len); } |