Fixed alert command creation error management

This commit is contained in:
fermin831 2018-10-22 16:54:22 +02:00
parent 7e8fbb4568
commit e24794d6ea
1 changed files with 11 additions and 13 deletions

View File

@ -321,9 +321,7 @@ if ($copy_command) {
$command_to_copy = db_get_row('talert_commands', 'id', $id); $command_to_copy = db_get_row('talert_commands', 'id', $id);
if ($command_to_copy === false) { if ($command_to_copy === false) {
ui_print_error_message(__("Command with id $id does not found.")); ui_print_error_message(__("Command with id $id does not found."));
break 2; } else {
}
// Prepare to insert the copy with same values // Prepare to insert the copy with same values
unset ($command_to_copy['id']); unset ($command_to_copy['id']);
$command_to_copy['name'].= __(' (copy)'); $command_to_copy['name'].= __(' (copy)');
@ -334,7 +332,7 @@ if ($copy_command) {
__('Successfully copied'), __('Successfully copied'),
__('Could not be copied') __('Could not be copied')
); );
}
} }
$table->width = '100%'; $table->width = '100%';