Merge branch 'ent-10965-corregir-error-en-la-creacion-de-tags-meta-y-nodo' into 'develop'

Ent 10965 corregir error en la creacion de tags meta y nodo

See merge request artica/pandorafms!5734
This commit is contained in:
Rafael Ameijeiras 2023-05-31 11:24:35 +00:00
commit bae20a460e
1 changed files with 11 additions and 7 deletions

View File

@ -121,12 +121,13 @@ if ($update_tag && $id_tag != 0) {
);
}
// Create tag: creates a new tag
// Create tag: creates a new tag.
if ($create_tag) {
$return_create = true;
// Erase comma characters on tag name
// Erase comma characters and spaces on tag name.
$name_tag = str_replace(',', '', $name_tag);
$name_tag = str_replace(' ', '', $name_tag);
$data = [];
$data['name'] = $name_tag;
@ -155,11 +156,14 @@ if ($create_tag) {
AUDIT_LOG_TAG_MANAGEMENT,
$auditMessage
);
ui_print_result_message(
$action === 'update',
__('Successfully created tag'),
__('Error creating tag')
);
if ($name_tag !== '') {
ui_print_result_message(
$action === 'update',
__('Successfully created tag'),
__('Error creating tag')
);
}
}
// Form fields are filled here