mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-03-04 10:11:26 +01:00
fix not working specifying of a field-name and simplified the documentation a bit
This commit is contained in:
parent
2127740fcd
commit
e15989115b
@ -1264,7 +1264,9 @@ class JsCalendar extends JsBase
|
||||
// allow to use {"egroupware.org-primary:<app>[:<field>]":"<id-or-value>"}
|
||||
if (str_starts_with($uid, 'egroupware.org-primary:'))
|
||||
{
|
||||
$uid = substr($uid, 23).':'.$relation;
|
||||
$uid = explode(':', substr($uid, 23), 2);
|
||||
array_splice($uid, 1, 0, $relation);
|
||||
$uid = implode(':', $uid);
|
||||
$relation = 'egroupware.org-primary';
|
||||
}
|
||||
switch($relation['relation'] ?? $relation ?? (strpos($uid, ':') === false ? 'parent' : 'egroupware.org-primary'))
|
||||
|
@ -41,9 +41,11 @@ Following RFCs / drafts used/planned for JSON encoding of InfoLog entries
|
||||
* `egroupware.org-primary` with the following attribute-names
|
||||
* `"<app>:<id>"` or
|
||||
* `"addressbook:<value>:<field>"` with addressbook field like `id` or `email` (no `contact_` prefix), or `egroupware.org:customfields/<name>`
|
||||
* 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
|
||||
* `"egroupware.org-primary:<app>[:<field>]":"<value>"` e.g. `"relatedTo/egroupware.org-primary:addressbook:#myUID":"12345"`
|
||||
* you can use `null` instead of a Relation-object to delete the existing value (not sending the attribute will NOT delete it!)
|
||||
* if your client only allows to send a 1-dimensional object you can use this alternative syntax, to specify the contact to link to via a (unique!) custom-field value
|
||||
```php
|
||||
"relatedTo/egroupware.org-primary:addressbook[:<field>]":"<value>"
|
||||
```
|
||||
* 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`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user