mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
Added a virgensita de guadalupe fix to generate networkmaps in windows systems
This commit is contained in:
parent
c19aaa1d64
commit
a9ca7b6a8d
@ -148,8 +148,9 @@ function networkmap_process_networkmap($id = 0) {
|
|||||||
case "WINNT":
|
case "WINNT":
|
||||||
case "Windows":
|
case "Windows":
|
||||||
$filename_plain = sys_get_temp_dir() . "\\plain.txt";
|
$filename_plain = sys_get_temp_dir() . "\\plain.txt";
|
||||||
$cmd = $config['graphviz_bin_dir'] . "\\$filter -Tplain -o " . $filename_plain . " " .
|
|
||||||
$filename_dot;
|
$cmd = io_safe_output($config['graphviz_bin_dir'] . "\\$filter.exe -Tplain -o " . $filename_plain . " " .
|
||||||
|
$filename_dot);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$filename_plain = sys_get_temp_dir() . "/plain.txt";
|
$filename_plain = sys_get_temp_dir() . "/plain.txt";
|
||||||
@ -157,7 +158,7 @@ function networkmap_process_networkmap($id = 0) {
|
|||||||
$filename_dot;
|
$filename_dot;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
system ($cmd);
|
system ($cmd);
|
||||||
|
|
||||||
unlink($filename_dot);
|
unlink($filename_dot);
|
||||||
@ -165,6 +166,8 @@ function networkmap_process_networkmap($id = 0) {
|
|||||||
$nodes = networkmap_loadfile($id, $filename_plain,
|
$nodes = networkmap_loadfile($id, $filename_plain,
|
||||||
$relation_nodes, $graph);
|
$relation_nodes, $graph);
|
||||||
|
|
||||||
|
unlink($filename_plain);
|
||||||
|
|
||||||
//Set the position of modules
|
//Set the position of modules
|
||||||
foreach ($nodes as $key => $node) {
|
foreach ($nodes as $key => $node) {
|
||||||
if ($node['type'] == 'module') {
|
if ($node['type'] == 'module') {
|
||||||
@ -265,8 +268,6 @@ function networkmap_process_networkmap($id = 0) {
|
|||||||
db_process_sql_update('tmap',
|
db_process_sql_update('tmap',
|
||||||
array('center_x' => $networkmap['center_x'], 'center_y' => $networkmap['center_y']),
|
array('center_x' => $networkmap['center_x'], 'center_y' => $networkmap['center_y']),
|
||||||
array('id' => $id));
|
array('id' => $id));
|
||||||
|
|
||||||
unlink($filename_plain);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $nodes_and_relations;
|
return $nodes_and_relations;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user