From 495fc6d50ff864dd1f91dd08b0438783d9143673 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Thu, 11 May 2017 10:13:46 +0200 Subject: [PATCH] Added new messages to massive operationso --- .../godmode/massive/massive_edit_agents.php | 3 +-- .../godmode/massive/massive_edit_modules.php | 11 ++++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/massive/massive_edit_agents.php b/pandora_console/godmode/massive/massive_edit_agents.php index 3bc99aff88..9f2072817a 100755 --- a/pandora_console/godmode/massive/massive_edit_agents.php +++ b/pandora_console/godmode/massive/massive_edit_agents.php @@ -178,10 +178,9 @@ if ($update_agents) { } } - ui_print_result_message ($result !== false, __('Agents updated successfully') . '(' . $n_edited . ')', - __('Agents cannot be updated')); + __('Agents cannot be updated (maybe there was no field to update)')); } $id_group = 0; diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index d3b1aae9f4..0f4f62d9e0 100755 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -110,6 +110,9 @@ if ($update) { $success += (int)$result; } } + if ($success == 0) { + $error_msg = __("Error updating the modules from a module type"); + } } else if ($force == 'group') { $agents_ = array_keys(agents_get_group_agents($group_select, false, 'none')); @@ -129,6 +132,9 @@ if ($update) { $success += (int)$result; } } + if ($success == 0) { + $error_msg = __("Error updating the modules from an agent group"); + } } } else { @@ -146,11 +152,14 @@ if ($update) { } } + if ($success == 0) { + $error_msg = __("Error updating the modules (maybe there was no field to update)"); + } } ui_print_result_message ($success > 0, __('Successfully updated') . "(" . $success . "/" . $count . ")", - __('Could not be updated')); + $error_msg); $info = 'Modules: ' . json_encode($modules_) . ' Agents: ' . json_encode($agents_); if ($success > 0) {