summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon2011-03-31 16:33:36 +0200
committerSimon2011-03-31 16:33:36 +0200
commit6fbd2a654067773df378efaa4283a4870073208b (patch)
tree9d12bccbe2b8f42e5ec00f4afe52751ce2bb7221
parentFilter können nurnoch auf eigene BootMenu verweisen (diff)
downloadpbs2-6fbd2a654067773df378efaa4283a4870073208b.tar.gz
pbs2-6fbd2a654067773df378efaa4283a4870073208b.tar.xz
pbs2-6fbd2a654067773df378efaa4283a4870073208b.zip
Graph-Anzeige gefixxt
-rw-r--r--application/controllers/StatsController.php4
-rw-r--r--application/modules/user/controllers/BootisoController.php3
-rw-r--r--application/modules/user/forms/Bootiso.php7
-rw-r--r--application/modules/user/forms/Bootos.php6
-rw-r--r--library/Pbs/Graph.php6
5 files changed, 16 insertions, 10 deletions
diff --git a/application/controllers/StatsController.php b/application/controllers/StatsController.php
index a54c528..8fc718e 100644
--- a/application/controllers/StatsController.php
+++ b/application/controllers/StatsController.php
@@ -15,6 +15,7 @@ class StatsController extends Zend_Controller_Action
if(isset($userIDsNamespace['groupID'])){
header("Content-Type: image/png");
+ header("Expires: 0");
$n = new Pbs_Graph();
$level = $this->_request->getParam('level');
@@ -22,8 +23,7 @@ class StatsController extends Zend_Controller_Action
$n->setHiglightLevel($level);
}
- $str = $n->graph($userIDsNamespace['groupID']);
- echo $str;
+ echo $n->graph($userIDsNamespace['groupID']);
}
}
}
diff --git a/application/modules/user/controllers/BootisoController.php b/application/modules/user/controllers/BootisoController.php
index b94404f..1b7f1c4 100644
--- a/application/modules/user/controllers/BootisoController.php
+++ b/application/modules/user/controllers/BootisoController.php
@@ -9,6 +9,7 @@ class user_BootisoController extends Zend_Controller_Action
public function init()
{
+ error_reporting(E_ALL);
if (Zend_Auth::getInstance()->hasIdentity()) {
$userIDsNamespace = Zend_Session::namespaceGet('userIDs');
if($userIDsNamespace['membershipID'] ==''){
@@ -232,7 +233,7 @@ class user_BootisoController extends Zend_Controller_Action
$bootiso->getPublic() != $bootisoold->getPublic() ||
$bootiso->getSerialnumber() != $bootisoold->getSerialnumber()){
//TODO ACL Is he allowed to edit other than Metadata?
- if(true)
+ if(false)
$this->_redirect('/user/bootiso/index/modifyresult/forbidden');
}
diff --git a/application/modules/user/forms/Bootiso.php b/application/modules/user/forms/Bootiso.php
index 3aba0af..7c472c0 100644
--- a/application/modules/user/forms/Bootiso.php
+++ b/application/modules/user/forms/Bootiso.php
@@ -120,12 +120,13 @@ class user_Form_Bootiso extends Zend_Form
});
function changeDepth(){
i = $("#depth option:selected").val();
- $('#depthimg').attr('src','/stats/graphgroup/level/' + i);
- }</script>
+ $('#depthimg').attr('src','/stats/graphgroup/level/' + i);
+ }
+ </script>
<div id='groups' style='text-align: center;'>
<div class='v1'>
- <img id='depthimg' src='/stats/graphgroup/' />
+ <img alt='Please select a public level' id='depthimg' src='/stats/graphgroup/level/0' />
</div>
</div>
diff --git a/application/modules/user/forms/Bootos.php b/application/modules/user/forms/Bootos.php
index f56761b..5fa890a 100644
--- a/application/modules/user/forms/Bootos.php
+++ b/application/modules/user/forms/Bootos.php
@@ -144,7 +144,11 @@ class user_Form_Bootos extends Zend_Form
?>
- <script>changeDepth();
+ <script>
+ $(document).ready(function(){
+ changeDepth();
+ $('#groups .v1').show();
+ });
function changeDepth(){
i = $("#depth option:selected").val();
$('#depthimg').attr('src','/stats/graphgroup/level/' + i);
diff --git a/library/Pbs/Graph.php b/library/Pbs/Graph.php
index c3f7139..1431c70 100644
--- a/library/Pbs/Graph.php
+++ b/library/Pbs/Graph.php
@@ -27,9 +27,9 @@ class Pbs_Graph{
$str = 'echo "';
$str .= $this->graphstring;
- $str .= '" | dot -Tpng ';
- passthru($str,$end);
- return $end;
+ $str .= '" | dot -Tpng ';
+ passthru($str, $result);
+ return $result;
}
private function getGroupTitle($groupID){
$group = new Application_Model_Group();