2014-01-16 Miguel de Dios <miguel.dedios@artica.es>

* godmode/agentes/modificar_agente.php,
	include/functions_agents.php: fixed the PHP warnings and notices.
	
	Fixes: #2412




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9330 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2014-01-16 17:26:27 +00:00
parent 6b35a90d28
commit 80b92c76ee
3 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2014-01-16 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/modificar_agente.php,
include/functions_agents.php: fixed the PHP warnings and notices.
Fixes: #2412
2014-01-16 Miguel de Dios <miguel.dedios@artica.es>
* general/header.php: fixed the PHP notices about the var

View File

@ -89,7 +89,7 @@ if ($agent_to_delete) {
// Check if the remote config file still exist
if (isset ($config["remote_config"])) {
enterprise_include_once('include/functions_config_agents.php');
if (enterprise_hook('config_agents_has_remote_configuration', $id_agente)) {
if (enterprise_hook('config_agents_has_remote_configuration', array($id_agente))) {
ui_print_error_message(__('Maybe the files conf or md5 could not be deleted'));
}
}

View File

@ -1644,6 +1644,9 @@ function agents_delete_agent ($id_agents, $disableACL = false) {
$nodes = db_get_all_rows_filter(
"tnetworkmap_enterprise_nodes",
array("id_agent" => $id_agent));
if (empty($nodes)) {
$nodes = array();
}
foreach ($nodes as $node) {
db_process_delete_temp ("tnetworkmap_enterprise_relation_nodes",
@ -1696,12 +1699,12 @@ function agents_delete_agent ($id_agents, $disableACL = false) {
$agent_md5 = md5 ($agent_name, false);
// Agent remote configuration editor
$file_name = $config["remote_config"]."/conf/".$agent_md5.".conf";
$file_name = $config["remote_config"] . "/conf/" . $agent_md5 . ".conf";
$error = !@unlink ($file_name);
if (!$error) {
$file_name = $config["remote_config"]."/md5/".$agent_md5.".md5";
$file_name = $config["remote_config"] . "/md5/" . $agent_md5 . ".md5";
$error = !@unlink ($file_name);
}