Fixed the check a empty dir for the graphviz directory

This commit is contained in:
mdtrooper 2014-09-10 12:28:13 +02:00
parent cfe6cf5c61
commit 225c3cc740
2 changed files with 8 additions and 2 deletions

View File

@ -75,7 +75,12 @@ else {
} }
else { else {
fwrite ($fh, $graph); 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); $cmd = escapeshellarg($graphviz_path.$filter) . " -Tcmapx " . escapeshellarg("-o$filename_map") . " -Tpng ". escapeshellarg("-o$filename_img") . " " . escapeshellarg($filename_dot);
$result = system ($cmd); $result = system ($cmd);
fclose ($fh); fclose ($fh);

View File

@ -80,7 +80,8 @@ else {
else { else {
fwrite ($fh, $graph); fwrite ($fh, $graph);
$graphviz_path = (isset($config['graphviz_bin_dir'])) ?
$graphviz_path = (!empty($config['graphviz_bin_dir'])) ?
io_safe_output($config['graphviz_bin_dir'] . "/") io_safe_output($config['graphviz_bin_dir'] . "/")
: :
""; "";