summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorSimon2011-04-13 17:32:53 +0200
committerSimon2011-04-13 17:32:53 +0200
commitf86b5fdf8e8ff6374c64c62792ac73bd787dc765 (patch)
tree14276905dca0d345fc4d507adbf9f559bfcd54fb /library
parentGroups - Rechte & RootNode darf keine Eltern (diff)
downloadpbs2-f86b5fdf8e8ff6374c64c62792ac73bd787dc765.tar.gz
pbs2-f86b5fdf8e8ff6374c64c62792ac73bd787dc765.tar.xz
pbs2-f86b5fdf8e8ff6374c64c62792ac73bd787dc765.zip
Superordinated Group ist immer die aktuelle Gruppe
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);