diff --git a/pandora_console/godmode/setup/setup_notifications.php b/pandora_console/godmode/setup/setup_notifications.php index 956571aa1f..d6ce67ab90 100644 --- a/pandora_console/godmode/setup/setup_notifications.php +++ b/pandora_console/godmode/setup/setup_notifications.php @@ -1,18 +1,31 @@ $res]; echo json_encode($result); return; } if (get_parameter('remove_source_on_database', 0)) { - $res = $is_users ? notifications_remove_users_from_source($source, $elements) : notifications_remove_group_from_source($source, $elements); + $res = ($is_users) ? notifications_remove_users_from_source($source, $elements) : notifications_remove_group_from_source($source, $elements); $result = ['result' => $res]; echo json_encode($result); return; @@ -65,7 +78,7 @@ if (get_parameter('update_config', 0)) { switch ($element) { // All users has other action. case 'all_users': - $res = $value ? notifications_add_group_to_source($source, [0]) : notifications_remove_group_from_source($source, [0]); + $res = ($value) ? notifications_add_group_to_source($source, [0]) : notifications_remove_group_from_source($source, [0]); break; default: @@ -89,7 +102,7 @@ $table_content->id = 'notifications-wrapper'; $table_content->class = 'databox filters'; $table_content->size['name'] = '30%'; -// Print each source configuration +// Print each source configuration. $table_content->data = array_map( function ($source) { return notifications_print_global_source_configuration($source); @@ -101,13 +114,6 @@ html_print_table($table_content); ?>