Merge branch '975-dot-and-plain-files-path-in-windows-dev' into 'develop'
Added OS filter See merge request !557
This commit is contained in:
commit
9b35a7f5ba
|
@ -122,7 +122,16 @@ function networkmap_process_networkmap($id = 0) {
|
||||||
null,
|
null,
|
||||||
$old_mode);
|
$old_mode);
|
||||||
|
|
||||||
$filename_dot = sys_get_temp_dir() . "/networkmap_" . $filter;
|
switch (PHP_OS) {
|
||||||
|
case "WIN32":
|
||||||
|
case "WINNT":
|
||||||
|
case "Windows":
|
||||||
|
$filename_dot = sys_get_temp_dir() . "\\networkmap_" . $filter;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$filename_dot = sys_get_temp_dir() . "/networkmap_" . $filter;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if ($simple) {
|
if ($simple) {
|
||||||
$filename_dot .= "_simple";
|
$filename_dot .= "_simple";
|
||||||
|
@ -133,11 +142,21 @@ function networkmap_process_networkmap($id = 0) {
|
||||||
$filename_dot .= "_" . $id . ".dot";
|
$filename_dot .= "_" . $id . ".dot";
|
||||||
|
|
||||||
file_put_contents($filename_dot, $graph);
|
file_put_contents($filename_dot, $graph);
|
||||||
|
|
||||||
$filename_plain = sys_get_temp_dir() . "/plain.txt";
|
switch (PHP_OS) {
|
||||||
|
case "WIN32":
|
||||||
$cmd = "$filter -Tplain -o " . $filename_plain . " " .
|
case "WINNT":
|
||||||
$filename_dot;
|
case "Windows":
|
||||||
|
$filename_plain = sys_get_temp_dir() . "\\plain.txt";
|
||||||
|
$cmd = $config['graphviz_win'] . "$filter -Tplain -o " . $filename_plain . " " .
|
||||||
|
$filename_dot;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$filename_plain = sys_get_temp_dir() . "/plain.txt";
|
||||||
|
$cmd = "$filter -Tplain -o " . $filename_plain . " " .
|
||||||
|
$filename_dot;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
system ($cmd);
|
system ($cmd);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue