From 4cc3a3096a5ad28a070db12424db586c40457243 Mon Sep 17 00:00:00 2001 From: Steven Date: Mon, 13 Feb 2012 17:15:31 +0100 Subject: [PATCH] Server verhindert beim OSX Client einen Delete --- 3rdparty/Sabre/DAV/Server.php | 2 +- apps/calendar/lib/connector_sabre.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/3rdparty/Sabre/DAV/Server.php b/3rdparty/Sabre/DAV/Server.php index 3d76d4f191..28c69188a3 100644 --- a/3rdparty/Sabre/DAV/Server.php +++ b/3rdparty/Sabre/DAV/Server.php @@ -648,7 +648,7 @@ class Sabre_DAV_Server { * @return void */ protected function httpDelete($uri) { - + if (!$this->broadcastEvent('beforeUnbind',array($uri))) return; $this->tree->delete($uri); diff --git a/apps/calendar/lib/connector_sabre.php b/apps/calendar/lib/connector_sabre.php index 263fb7ffde..47bf4f202e 100644 --- a/apps/calendar/lib/connector_sabre.php +++ b/apps/calendar/lib/connector_sabre.php @@ -206,6 +206,10 @@ class OC_Connector_Sabre_CalDAV extends Sabre_CalDAV_Backend_Abstract { * @return void */ public function deleteCalendar($calendarId) { + if(preg_match( '=iCal/[1-4]?.*Mac OS X/10.[1-6](.[0-9])?=', $_SERVER['HTTP_USER_AGENT'] )){ + throw new Sabre_DAV_Exception_Forbidden("Action is not possible with OSX 10.6.x", 403); + } + OC_Calendar_Calendar::deleteCalendar($calendarId); }