From: Michael J. Rubinsky Date: Sat, 24 Oct 2009 18:02:26 +0000 (-0400) Subject: Only obtain a lock on the resource if it's a RESPONSETYPE_AUTO resource. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=4eac1bc9ddfb6888089d51e6144b0b691dc6d548;p=horde.git Only obtain a lock on the resource if it's a RESPONSETYPE_AUTO resource. --- diff --git a/kronolith/lib/Event.php b/kronolith/lib/Event.php index b67d90837..eebf2fb2c 100644 --- a/kronolith/lib/Event.php +++ b/kronolith/lib/Event.php @@ -333,9 +333,14 @@ abstract class Kronolith_Event } /* Lock the resource and get the response */ - $principle = 'calendar/' . $rcal; - $lock[$resource->getId()] = $locks->setLock(Horde_Auth::getAuth(), 'kronolith', $principle, 5, Horde_Lock::TYPE_EXCLUSIVE); - if (!$lock[$resource->getId()]) { + if ($resource->get('response_type') == Kronolith_Resource::RESPONSETYPE_AUTO) { + $principle = 'calendar/' . $rcal; + $lock[$resource->getId()] = $locks->setLock(Horde_Auth::getAuth(), 'kronolith', $principle, 5, Horde_Lock::TYPE_EXCLUSIVE); + $haveLock = true; + } else { + $haveLock = false; + } + if ($haveLock && !$lock[$resource->getId()]) { // Already locked // For now, just fail. Not sure how else to capture the locked // resources and notify the user.