From 9b6cf6612354e6bfec6ee817874e54e1b85ccc1e Mon Sep 17 00:00:00 2001
From: Simon
Date: Fri, 25 Mar 2011 15:09:25 +0100
Subject: Session war im Filter nicht gesetzt
---
application/controllers/IndexController.php | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
(limited to 'application/controllers/IndexController.php')
diff --git a/application/controllers/IndexController.php b/application/controllers/IndexController.php
index d26f8d4..2c53550 100644
--- a/application/controllers/IndexController.php
+++ b/application/controllers/IndexController.php
@@ -15,11 +15,13 @@ class IndexController extends Zend_Controller_Action
$this->_redirect('/fbgui/index/index');
}
-
+ echo 'tesT';
// action body
+ $n = new Pbs_Graph();
+ print_a($n->graph(2));
}
-
+
}
--
cgit v1.2.3-55-g7522
From fe944ac09029d3e173b629f99e0b8ef4d8212d0b Mon Sep 17 00:00:00 2001
From: Simon
Date: Fri, 25 Mar 2011 15:51:56 +0100
Subject: gruppengraph nach einloggen in /user/
---
.zfproject.xml | 7 ++++++
application/controllers/IndexController.php | 9 ++++---
application/controllers/StatsController.php | 28 ++++++++++++++++++++++
.../modules/user/views/scripts/index/index.phtml | 2 +-
library/Pbs/Graph.php | 2 +-
send-post.html | 8 ++-----
.../controllers/StatsControllerTest.php | 20 ++++++++++++++++
7 files changed, 63 insertions(+), 13 deletions(-)
create mode 100644 application/controllers/StatsController.php
create mode 100644 tests/application/controllers/StatsControllerTest.php
(limited to 'application/controllers/IndexController.php')
diff --git a/.zfproject.xml b/.zfproject.xml
index eda876f..70ccd1c 100644
--- a/.zfproject.xml
+++ b/.zfproject.xml
@@ -15,6 +15,9 @@
+
+
+
@@ -689,6 +692,9 @@
+
+
+
@@ -753,6 +759,7 @@
+
diff --git a/application/controllers/IndexController.php b/application/controllers/IndexController.php
index 2c53550..cf6673c 100644
--- a/application/controllers/IndexController.php
+++ b/application/controllers/IndexController.php
@@ -14,12 +14,11 @@ class IndexController extends Zend_Controller_Action
$_SESSION['postdata'] = $_POST;
$this->_redirect('/fbgui/index/index');
}
-
- echo 'tesT';
+
// action body
- $n = new Pbs_Graph();
- print_a($n->graph(2));
- }
+
+
+ }
}
diff --git a/application/controllers/StatsController.php b/application/controllers/StatsController.php
new file mode 100644
index 0000000..024eacd
--- /dev/null
+++ b/application/controllers/StatsController.php
@@ -0,0 +1,28 @@
+_helper->layout->disableLayout();
+ $this->_helper->viewRenderer->setNoRender();
+ }
+
+ public function graphgroupAction(){
+
+ $userIDsNamespace = Zend_Session::namespaceGet('userIDs');
+
+ if($userIDsNamespace['groupID'] !=''){
+ header("Content-Type: image/png");
+
+ $n = new Pbs_Graph();
+ $str = 'echo "';
+ $str .= $n->graph($userIDsNamespace['groupID']);
+ $str .= '" | dot -Tpng ';
+
+ passthru($str);
+ }
+ }
+}
+
diff --git a/application/modules/user/views/scripts/index/index.phtml b/application/modules/user/views/scripts/index/index.phtml
index a6e84a7..0f1fab5 100644
--- a/application/modules/user/views/scripts/index/index.phtml
+++ b/application/modules/user/views/scripts/index/index.phtml
@@ -13,6 +13,6 @@
-
+
diff --git a/library/Pbs/Graph.php b/library/Pbs/Graph.php
index 13bbe3a..7711dce 100644
--- a/library/Pbs/Graph.php
+++ b/library/Pbs/Graph.php
@@ -14,7 +14,7 @@ class Pbs_Graph{
$this->graphstring = 'digraph groups {
- size="6,6";';
+ size="5,5";';
$this->getParentGroups($groupID);
$this->getChildGroups($groupID);
$this->graphstring .= '}';
diff --git a/send-post.html b/send-post.html
index 6e04b1f..6cad8c8 100644
--- a/send-post.html
+++ b/send-post.html
@@ -9,8 +9,6 @@