From 40dd19fd3e0545cc6e84302f20c6be3dab3d0fa3 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 19 Jun 2011 09:01:15 +0000 Subject: [PATCH] * CardDAV/GroupDAV: handle deleted contacts, as not existing (404 Not Found) --- addressbook/inc/class.addressbook_groupdav.inc.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/addressbook/inc/class.addressbook_groupdav.inc.php b/addressbook/inc/class.addressbook_groupdav.inc.php index 64560d8680..0e90a36260 100644 --- a/addressbook/inc/class.addressbook_groupdav.inc.php +++ b/addressbook/inc/class.addressbook_groupdav.inc.php @@ -565,7 +565,13 @@ class addressbook_groupdav extends groupdav_handler */ function read($id) { - return $this->bo->read(array(self::$path_attr => $id)); + $contact = $this->bo->read(array(self::$path_attr => $id)); + + if ($contact && $contact['tid'] == addressbook_so::DELETED_TYPE) + { + $contact = null; // handle deleted events, as not existing (404 Not Found) + } + return $contact; } /**