From: Michael J. Rubinsky Date: Mon, 21 Sep 2009 23:53:27 +0000 (-0400) Subject: Correct conditional that catches conflicts. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=59a36c0b268e01d2928590cb9d863704ffb22099;p=horde.git Correct conditional that catches conflicts. Allow the next event to start at the end time of the previous event. --- 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; }