From 93d44abdfb0844b9e12e2c9a74249ba9ec2e8316 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Fri, 25 Sep 2009 16:16:46 +0000 Subject: [PATCH] 2009-09-18 Miguel de Dios * include/functions_db.php: fix the delete the conf and md5 files of agent to delete, before try delete conf and md5 files with name in uppercase. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1978 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/include/functions_db.php | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index dcac6573a8..33d6fd7422 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2009-09-18 Miguel de Dios + + * include/functions_db.php: fix the delete the conf and md5 files of agent + to delete, before try delete conf and md5 files with name in uppercase. + 2009-09-18 Miguel de Dios * include/functions_html.php: add second parameter for trace a log in server diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index f72f8788ca..456ff7367e 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -2823,11 +2823,13 @@ function delete_agent ($id_agents) { // Delete remote configuration if (isset ($config["remote_config"])) { - $agent_md5 = md5 (get_agent_name ($id_agent), FALSE); + $agent_md5 = md5 (get_agent_name ($id_agent,'none'), FALSE); + if (file_exists ($config["remote_config"]."/md5/".$agent_md5.".md5")) { // Agent remote configuration editor $file_name = $config["remote_config"]."/conf/".$agent_md5.".conf"; @unlink ($file_name); + $file_name = $config["remote_config"]."/md5/".$agent_md5.".md5"; @unlink ($file_name); }