mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-02 19:39:26 +01:00
fixed wrong status-code for CardDAV DELETE
This commit is contained in:
parent
d7bc20bf6f
commit
8eb10b2409
@ -751,7 +751,8 @@ class addressbook_bo extends addressbook_so
|
|||||||
{
|
{
|
||||||
$delete = $old;
|
$delete = $old;
|
||||||
$delete['tid'] = addressbook_so::DELETED_TYPE;
|
$delete['tid'] = addressbook_so::DELETED_TYPE;
|
||||||
$ok = $this->save($delete);
|
if ($check_etag) $delete['etag'] = $check_etag;
|
||||||
|
if (($ok = $this->save($delete))) $ok = true; // we have to return true or false
|
||||||
egw_link::unlink(0,'addressbook',$id,'','','',true);
|
egw_link::unlink(0,'addressbook',$id,'','','',true);
|
||||||
}
|
}
|
||||||
elseif (($ok = parent::delete($id,$check_etag)))
|
elseif (($ok = parent::delete($id,$check_etag)))
|
||||||
|
@ -772,12 +772,15 @@ class addressbook_groupdav extends groupdav_handler
|
|||||||
{
|
{
|
||||||
return $contact;
|
return $contact;
|
||||||
}
|
}
|
||||||
if (($Ok = isset($contact['list_id']) ? $this->bo->delete_list($contact['list_id']) !== false :
|
if (isset($contact['list_id']))
|
||||||
$this->bo->delete($contact['id'],self::etag2value($this->http_if_match))) === 0)
|
{
|
||||||
|
$ok = $this->bo->delete_list($contact['list_id']) !== false;
|
||||||
|
}
|
||||||
|
elseif (($ok = $this->bo->delete($contact['id'],self::etag2value($this->http_if_match))) === 0)
|
||||||
{
|
{
|
||||||
return '412 Precondition Failed';
|
return '412 Precondition Failed';
|
||||||
}
|
}
|
||||||
return $Ok;
|
return $ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user