fix: [tags:relationship] Fixed synchronisation of relationship_type

pull/8906/head
Sami Mokaddem 2023-01-13 11:09:56 +01:00
parent 683a90199c
commit 97cd2604d6
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 12 additions and 2 deletions

View File

@ -3373,7 +3373,11 @@ class Event extends AppModel
foreach ($event['EventTag'] as $tag) {
$tagId = $this->captureTagWithCache($tag['Tag'], $user, $capturedTags);
if ($tagId && !in_array($tagId, $event_tag_ids)) {
$eventTags[] = array('tag_id' => $tagId);
$eventTags[] = array(
'tag_id' => $tagId,
'local' => isset($tag['local']) ? $tag['local'] : 0,
'relationship_type' => isset($tag['relationship_type']) ? $tag['relationship_type'] : '',
);
$event_tag_ids[] = $tagId;
}
}
@ -3388,6 +3392,7 @@ class Event extends AppModel
$eventTags[] = [
'tag_id' => $tag_id,
'local' => isset($tag['local']) ? $tag['local'] : 0,
'relationship_type' => isset($tag['relationship_type']) ? $tag['relationship_type'] : '',
];
$event_tag_ids[] = $tag_id;
}
@ -3448,7 +3453,11 @@ class Event extends AppModel
$a['AttributeTag'] = array($a['AttributeTag']);
}
foreach ($a['AttributeTag'] as $tag) {
$attributeTags[] = array('tag_id' => $this->captureTagWithCache($tag['Tag'], $user, $capturedTags));
$attributeTags[] = array(
'tag_id' => $this->captureTagWithCache($tag['Tag'], $user, $capturedTags),
'local' => isset($tag['local']) ? $tag['local'] : 0,
'relationship_type' => isset($tag['relationship_type']) ? $tag['relationship_type'] : '',
);
}
}
if (isset($a['Tag'])) {
@ -3461,6 +3470,7 @@ class Event extends AppModel
$attributeTags[] = [
'tag_id' => $tagId,
'local' => isset($tag['local']) ? $tag['local'] : 0,
'relationship_type' => isset($tag['relationship_type']) ? $tag['relationship_type'] : '',
];
}
}