From 59a36c0b268e01d2928590cb9d863704ffb22099 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Mon, 21 Sep 2009 19:53:27 -0400 Subject: [PATCH] Correct conditional that catches conflicts. Allow the next event to start at the end time of the previous event. --- kronolith/lib/Resource/Single.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kronolith/lib/Resource/Single.php b/kronolith/lib/Resource/Single.php index 6e47f851a..5b5c9024f 100644 --- a/kronolith/lib/Resource/Single.php +++ b/kronolith/lib/Resource/Single.php @@ -57,8 +57,10 @@ class Kronolith_Resource_Single extends Kronolith_Resource_Base $e->hasStatus(Kronolith::STATUS_FREE)) && $e->getUID() !== $uid) { - if (!($e->start->compareDateTime($end) >= 1 || - $e->end->compareDateTime($start) <= -1)) { + // Comparing to zero allows the events to start at the same + // the previous event ends. + if (!($e->start->compareDateTime($end) >= 0) && + !($e->end->compareDateTime($start) <= 0)) { return false; } -- 2.11.0