1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-01-30 19:52:17 +01:00

CardDAV: Etag wasn't returned in getCard()

This commit is contained in:
Thomas Tanghus 2014-01-26 23:00:14 +01:00
parent d412e8fec9
commit c3d30be656

View File

@ -207,8 +207,11 @@ class Backend extends \Sabre_CardDAV_Backend_Abstract {
} catch(\Exception $e) {
throw new \Sabre_DAV_Exception_NotFound($e->getMessage());
}
return ($contact ? $contact : false);
if(is_array($contact) ) {
$contact['etag'] = '"' . md5($contact['carddata']) . '"';
return $contact;
}
throw new \Sabre_DAV_Exception('Error retrieving the card');
}
/**