From 8de21e75867c17f642b89e31921d598c36366029 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 26 Feb 2013 15:36:37 +0000 Subject: [PATCH] 2013-02-25 Miguel de Dios * include/functions_modules.php: fixed in function "modules_update_agent_module" the check disabled value. Fixes: #3606060 * general/login_page.php: cleaned source code style. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7720 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 9 +++++++++ pandora_console/general/login_page.php | 2 +- pandora_console/include/functions_modules.php | 12 ++++++++---- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index c42661379d..8619bf72f8 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,12 @@ +2013-02-25 Miguel de Dios + + * include/functions_modules.php: fixed in function + "modules_update_agent_module" the check disabled value. + + Fixes: #3606060 + + * general/login_page.php: cleaned source code style. + 2013-02-25 Ramon Novoa * godmode/groups/configure_group.php: Fixed the name of the group diff --git a/pandora_console/general/login_page.php b/pandora_console/general/login_page.php index 1d0138f945..c2cd93d3f4 100644 --- a/pandora_console/general/login_page.php +++ b/pandora_console/general/login_page.php @@ -42,7 +42,7 @@ if (defined ('PANDORA_ENTERPRISE')) { html_print_image ("images/pandora_login_enterprise.png", false, array ("alt" => "logo", "border" => 0)); } else { - html_print_image ("images/pandora_login.png", false, array ("alt" => "logo", "border" => 0)); + html_print_image ("images/pandora_login.png", false, array ("alt" => "logo", "border" => 0)); } echo ''; diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index 172f929ef8..a19b77097d 100644 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -293,7 +293,7 @@ function modules_update_agent_module ($id, $values, $onlyNoDeletePending = false $return_tag = tags_update_module_tag ($id, $tags); } - if ($return_tag === false){ + if ($return_tag === false) { return ERR_DB; } @@ -304,8 +304,12 @@ function modules_update_agent_module ($id, $values, $onlyNoDeletePending = false } // Disable action requires a special function - if(isset($values['disabled'])) { - $result_disable = modules_change_disabled($id, $values['disabled']); + if (isset($values['disabled'])) { + $result_disable = NOERR; + if ($values['disabled']) + $result_disable = modules_change_disabled($id, + $values['disabled']); + unset($values['disabled']); } else { @@ -314,7 +318,7 @@ function modules_update_agent_module ($id, $values, $onlyNoDeletePending = false $result = @db_process_sql_update ('tagente_modulo', $values, $where); - if($result === false || $result_disable === ERR_GENERIC) { + if (($result === false) || ($result_disable === ERR_GENERIC)) { return ERR_DB; } else {