mirror of https://github.com/MISP/MISP
fix: [enrichment] Fixed change on types & categories
... that should be applied on attributes level and not on object attributes levelpull/4584/head
parent
92f36261ca
commit
4001859c9f
|
@ -161,23 +161,7 @@
|
|||
foreach ($object['Attribute'] as $a => $attribute) {
|
||||
echo '<tr class="ObjectAttribute">';
|
||||
echo '<td class="ObjectRelation">' . h($attribute['object_relation']) . '</td>';
|
||||
foreach (array('category', 'type') as $field) {
|
||||
$field_header = 'class="Attribute' . ucfirst($field);
|
||||
if (isset($attribute[$field])) {
|
||||
if (is_array($attribute[$field])) {
|
||||
echo '<td class="short" style="width:40px;text-align:center;"><select ' . $field_header . 'Select" style="padding:0px;height:20px;margin-bottom:0px;">';
|
||||
foreach ($attribute[$field] as $v => $value) {
|
||||
echo '<option value="' . h($value) . '" ' . ($v ? '' : 'selected="selected"') . '>' . h($value) . '</option>';
|
||||
}
|
||||
echo '</select></td>';
|
||||
} else {
|
||||
echo '<td ' . $field_header . '">' . h($attribute[$field]) . '</td>';
|
||||
}
|
||||
} else {
|
||||
echo '<td ' . $field_header . '"></td>';
|
||||
}
|
||||
}
|
||||
foreach (array('value', 'uuid') as $field) {
|
||||
foreach ($attributeFields as $field) {
|
||||
echo '<td class="Attribute' . ucfirst($field) . '">' . (isset($attribute[$field]) ? h($attribute[$field]) : '') . '</td>';
|
||||
}
|
||||
?>
|
||||
|
@ -239,7 +223,23 @@
|
|||
<?php
|
||||
foreach ($event['Attribute'] as $a => $attribute) {
|
||||
echo '<tr class="MISPAttribute">';
|
||||
foreach ($attributeFields as $field) {
|
||||
foreach (array('category', 'type') as $field) {
|
||||
$field_header = 'class="Attribute' . ucfirst($field);
|
||||
if (isset($attribute[$field])) {
|
||||
if (is_array($attribute[$field])) {
|
||||
echo '<td class="short" style="width:40px;text-align:center;"><select ' . $field_header . 'Select" style="padding:0px;height:20px;margin-bottom:0px;">';
|
||||
foreach ($attribute[$field] as $v => $value) {
|
||||
echo '<option value="' . h($value) . '" ' . ($v ? '' : 'selected="selected"') . '>' . h($value) . '</option>';
|
||||
}
|
||||
echo '</select></td>';
|
||||
} else {
|
||||
echo '<td ' . $field_header . '">' . h($attribute[$field]) . '</td>';
|
||||
}
|
||||
} else {
|
||||
echo '<td ' . $field_header . '"></td>';
|
||||
}
|
||||
}
|
||||
foreach (array('value', 'uuid') as $field) {
|
||||
echo '<td class="Attribute' . ucfirst($field) . '">' . (isset($attribute[$field]) ? h($attribute[$field]) : '') . '</td>';
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue