mirror of https://github.com/MISP/MISP
fix: [tags:relationship] Fixed synchronisation of relationship_type
parent
683a90199c
commit
97cd2604d6
|
@ -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'] : '',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue