diff --git a/pandora_console/operation/agentes/networkmap.groups.php b/pandora_console/operation/agentes/networkmap.groups.php index d86929bdb2..a61447dd62 100644 --- a/pandora_console/operation/agentes/networkmap.groups.php +++ b/pandora_console/operation/agentes/networkmap.groups.php @@ -75,7 +75,12 @@ else { } else { fwrite ($fh, $graph); - $graphviz_path = ($config['graphviz_bin_dir']) ? io_safe_output($config['graphviz_bin_dir']."/") : ""; + + $graphviz_path = (!empty($config['graphviz_bin_dir'])) ? + io_safe_output($config['graphviz_bin_dir'] . "/") + : + ""; + $cmd = escapeshellarg($graphviz_path.$filter) . " -Tcmapx " . escapeshellarg("-o$filename_map") . " -Tpng ". escapeshellarg("-o$filename_img") . " " . escapeshellarg($filename_dot); $result = system ($cmd); fclose ($fh); diff --git a/pandora_console/operation/agentes/networkmap.topology.php b/pandora_console/operation/agentes/networkmap.topology.php index 3e5b56b604..fd154687a6 100644 --- a/pandora_console/operation/agentes/networkmap.topology.php +++ b/pandora_console/operation/agentes/networkmap.topology.php @@ -80,7 +80,8 @@ else { else { fwrite ($fh, $graph); - $graphviz_path = (isset($config['graphviz_bin_dir'])) ? + + $graphviz_path = (!empty($config['graphviz_bin_dir'])) ? io_safe_output($config['graphviz_bin_dir'] . "/") : "";