From 80a5d0b0b926753f0a9f9344a7baa6c250736105 Mon Sep 17 00:00:00 2001 From: Fermin Date: Fri, 8 Feb 2019 10:32:04 +0100 Subject: [PATCH] Removed unused code and format some files Former-commit-id: 5f8da31efc5241dd16002565fdb89d774072b7b3 --- .../godmode/setup/setup_notifications.php | 66 +++++++-------- .../include/functions_notifications.php | 80 ++++++++++--------- 2 files changed, 74 insertions(+), 72 deletions(-) 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); ?>