From fca04a6dab252eb9e8c0a92ce3b7e14b32e68d1e Mon Sep 17 00:00:00 2001 From: Sebastian Schmelzer Date: Wed, 11 Jan 2012 14:36:35 +0100 Subject: format source files --- application/controllers/StatsController.php | 92 ++++++++++++++--------------- 1 file changed, 45 insertions(+), 47 deletions(-) (limited to 'application/controllers/StatsController.php') diff --git a/application/controllers/StatsController.php b/application/controllers/StatsController.php index 05762a4..6ccd6bc 100644 --- a/application/controllers/StatsController.php +++ b/application/controllers/StatsController.php @@ -1,51 +1,49 @@ -_helper->layout->disableLayout(); - $this->_helper->viewRenderer->setNoRender(); - } - - public function graphgroupAction(){ - - $userIDsNamespace = Zend_Session::namespaceGet('userIDs'); - - if(isset($userIDsNamespace['groupID'])){ - header("Content-Type: image/png"); - header("Expires: 0"); - $n = new Pbs_Graph(); - - $level = $this->_request->getParam('level'); - if(is_numeric($level) && $level != ''){ - $n->setHiglightLevel($level); - } - $groupID = $userIDsNamespace['groupID']; - - $group = $this->_request->getParam('group'); - if((Pbs_Acl::checkRight('gsdo') || Pbs_Acl::checkRight('gsdog')) && is_numeric($group)){ - $groupID = $group; - } - - $child = $this->_request->getParam('child'); - if(Pbs_Acl::checkRight('glk') && $child != ''){ - $n->newChild($child); - } - - echo $n->graph($groupID); - } - } +* This program is free software distributed under the GPL version 2. +* See http://gpl.openslx.org/ +* +* If you have any feedback please consult http://feedback.openslx.org/ and +* send your suggestions, praise, or complaints to feedback@openslx.org +* +* General information about OpenSLX can be found at http://openslx.org/ +*/ + +class StatsController extends Zend_Controller_Action { + + public function init() { + $this->_helper->layout->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); + } + + public function graphgroupAction() { + + $userIDsNamespace = Zend_Session::namespaceGet('userIDs'); + + if(isset($userIDsNamespace['groupID'])) { + header("Content-Type: image/png"); + header("Expires: 0"); + $n = new Pbs_Graph(); + + $level = $this->_request->getParam('level'); + if(is_numeric($level) && $level != '') { + $n->setHiglightLevel($level); + } + $groupID = $userIDsNamespace['groupID']; + + $group = $this->_request->getParam('group'); + if((Pbs_Acl::checkRight('gsdo') || Pbs_Acl::checkRight('gsdog')) && is_numeric($group)) { + $groupID = $group; + } + + $child = $this->_request->getParam('child'); + if(Pbs_Acl::checkRight('glk') && $child != '') { + $n->newChild($child); + } + + echo $n->graph($groupID); + } + } } -- cgit v1.2.3-55-g7522