mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-03-04 18:21:35 +01:00
some small fixes to set the primary link/contact via a 1-dimension object some simple clients only allow to send
This commit is contained in:
parent
b38fb45a23
commit
cf698f9127
@ -357,7 +357,7 @@ class JsBase
|
|||||||
{
|
{
|
||||||
throw new \InvalidArgumentException("Trying to patch not existing attribute with path $path!");
|
throw new \InvalidArgumentException("Trying to patch not existing attribute with path $path!");
|
||||||
}
|
}
|
||||||
$parent = $target;
|
$parent = &$target;
|
||||||
$target = &$target[$part];
|
$target = &$target[$part];
|
||||||
}
|
}
|
||||||
if (isset($value))
|
if (isset($value))
|
||||||
|
@ -1260,7 +1260,7 @@ class JsCalendar extends JsBase
|
|||||||
{
|
{
|
||||||
throw new \InvalidArgumentException("Missing or invalid @Type!");
|
throw new \InvalidArgumentException("Missing or invalid @Type!");
|
||||||
}
|
}
|
||||||
switch($relation['relation'] ?? (strpos($uid, ':') === false ? 'parent' : 'egroupware.org-primary'))
|
switch($relation['relation'] ?? $relation ?? (strpos($uid, ':') === false ? 'parent' : 'egroupware.org-primary'))
|
||||||
{
|
{
|
||||||
case 'parent':
|
case 'parent':
|
||||||
if (!($parent = self::getInfolog()->read(['info_uid' => $uid])))
|
if (!($parent = self::getInfolog()->read(['info_uid' => $uid])))
|
||||||
|
@ -765,7 +765,7 @@ class Storage
|
|||||||
$rows = $backend->search($criteria, $only_keys, $order_by, $extra_cols,
|
$rows = $backend->search($criteria, $only_keys, $order_by, $extra_cols,
|
||||||
$wildcard, $empty, $op, $start, $filter, $join, false, $ignore_acl);
|
$wildcard, $empty, $op, $start, $filter, $join, false, $ignore_acl);
|
||||||
|
|
||||||
$this->total = $backend->total;
|
$this->total = (int)$backend->total;
|
||||||
|
|
||||||
if ($rows)
|
if ($rows)
|
||||||
{
|
{
|
||||||
|
@ -41,7 +41,8 @@ Following RFCs / drafts used/planned for JSON encoding of InfoLog entries
|
|||||||
* `egroupware.org-primary` with the following attribute-names
|
* `egroupware.org-primary` with the following attribute-names
|
||||||
* `"<app>:<id>"` or
|
* `"<app>:<id>"` or
|
||||||
* `"addressbook:<value>:<field>"` with addressbook field like `id` or `email` (no `contact_` prefix), or `egroupware.org:customfields/<name>`
|
* `"addressbook:<value>:<field>"` with addressbook field like `id` or `email` (no `contact_` prefix), or `egroupware.org:customfields/<name>`
|
||||||
* you can use `null` instead of a Relation-object to delete the existing value
|
* if you client only allows to send a 1-dimensional object you can use `"relatedTo/addressbook:<value>:#<name>":"egroupware.org-primary"`, to specify the contact to link to via a (unique!) custom-field value
|
||||||
|
* you can use `null` instead of a Relation-object to delete the existing value (not sending the attribute will NOT delete it!)
|
||||||
* you can use the [`links` sub-collection](Links-and-attachments.md) of each entry to add relations/links to other application-entries
|
* you can use the [`links` sub-collection](Links-and-attachments.md) of each entry to add relations/links to other application-entries
|
||||||
* InfoLogs primary link can also be created via the [`links` sub-collection](Links-and-attachments.md) with a`rel` of `egroupware.org-primary`
|
* InfoLogs primary link can also be created via the [`links` sub-collection](Links-and-attachments.md) with a`rel` of `egroupware.org-primary`
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user