mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
* Addressbook/CardDAV: fix not working import / PUT of birthday in vCard
and prefer=representation on a "412 Precondition Failed" for a group
This commit is contained in:
parent
2741ebc959
commit
4cf9d46bf1
@ -672,6 +672,8 @@ class addressbook_groupdav extends groupdav_handler
|
||||
if ($this->debug) error_log(__METHOD__."(,$id) save(".array2string($contact).") failed, Ok=$save_ok");
|
||||
if ($save_ok === 0)
|
||||
{
|
||||
// honor Prefer: return=representation for 412 too (no need for client to explicitly reload)
|
||||
$this->check_return_representation($options, $id, $user);
|
||||
return '412 Precondition Failed';
|
||||
}
|
||||
return '403 Forbidden'; // happens when writing new entries in AB's without ADD rights
|
||||
|
@ -929,7 +929,10 @@ class addressbook_vcal extends addressbook_bo
|
||||
{
|
||||
if (!empty($fieldName))
|
||||
{
|
||||
$value = trim($vcardValues[$vcardKey]['values'][$fieldKey]);
|
||||
if (is_scalar($vcardValues[$vcardKey]['values'][$fieldKey]))
|
||||
{
|
||||
$value = trim($vcardValues[$vcardKey]['values'][$fieldKey]);
|
||||
}
|
||||
if ($pref_tel && (($vcardKey == $pref_tel) ||
|
||||
($vcardValues[$vcardKey]['name'] == 'TEL') &&
|
||||
($vcardValues[$vcardKey]['value'] == $vcardValues[$pref_tel]['value'])))
|
||||
@ -939,9 +942,9 @@ class addressbook_vcal extends addressbook_bo
|
||||
switch($fieldName)
|
||||
{
|
||||
case 'bday':
|
||||
$contact[$fieldName] = $vcardValues[$vcardKey]['values']['year'] .
|
||||
'-' . $vcardValues[$vcardKey]['values']['month'] .
|
||||
'-' . $vcardValues[$vcardKey]['values']['mday'];
|
||||
$contact[$fieldName] = $vcardValues[$vcardKey]['value']['year'] .
|
||||
'-' . $vcardValues[$vcardKey]['value']['month'] .
|
||||
'-' . $vcardValues[$vcardKey]['value']['mday'];
|
||||
break;
|
||||
|
||||
case 'private':
|
||||
|
Loading…
Reference in New Issue
Block a user