fix: [UI] Event index tag display default setting fixed

- Resolving the fix that really wasn't...
pull/4666/head
iglocska 2019-08-05 09:15:22 +02:00
parent dd1c756682
commit 082fa4b174
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
2 changed files with 5 additions and 3 deletions

View File

@ -142,7 +142,7 @@
'required_taxonomies' => false,
'columnised' => true,
'static_tags_only' => 1,
'tag_display_style' => Configure::check('MISP.full_tags_on_event_index') ? Configure::read('MISP.full_tags_on_event_index') : 2
'tag_display_style' => Configure::check('MISP.full_tags_on_event_index') ? Configure::read('MISP.full_tags_on_event_index') : 1
)
)
);

View File

@ -48,7 +48,9 @@
$aClass = 'tag nowrap';
$aText = trim($tag['Tag']['name']);
if (isset($tag_display_style)) {
if ($tag_display_style == 0) {
if (!isset($tag_display_style) || $tag_display_style == 1) {
// default behaviour, do nothing for now
} else if ($tag_display_style == 2) {
$separator_pos = strpos($aText, ':');
if ($separator_pos !== false) {
$aTextModified = substr($aText, $separator_pos + 1);
@ -59,7 +61,7 @@
}
$aTextModified = h($aTextModified);
}
} else if ($tag_display_style == 2) {
} else if ($tag_display_style === 0 || $tag_display_style === '0') {
$aTextModified = ' ';
}
}