summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/Pbs/Graph.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/library/Pbs/Graph.php b/library/Pbs/Graph.php
index e7ebc55..e42b9d4 100644
--- a/library/Pbs/Graph.php
+++ b/library/Pbs/Graph.php
@@ -15,6 +15,9 @@ class Pbs_Graph{
$db = $this->db;
+ $path = "../resources/groupgraphs/";
+ @mkdir($path ,0777, true);
+
$this->graphstring = 'digraph groups {
size="5,5";
pad=0.1;
@@ -25,6 +28,13 @@ class Pbs_Graph{
$this->getParentGroups($groupID);
$this->getChildGroups($groupID);
$this->graphstring .= '}';
+
+ // for debugging
+ # $fp = fopen($path.'thisgraph.dot', "w");
+ # fputs ($fp, $this->graphstring);
+ # fclose ($fp);
+
+
$this->graphstring = str_replace(array("\t","\n"),"",$this->graphstring);
$this->graphstring = str_replace('"','\"',$this->graphstring);