summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon2011-04-25 19:20:24 +0200
committerSimon2011-04-25 19:20:24 +0200
commit9589f87e6f9f9d4b6b80aed33d978c7d0964bb3a (patch)
tree1a6750d9df279415008551079c5924a7d5394230
parentgraphsize limited (diff)
downloadpbs2-9589f87e6f9f9d4b6b80aed33d978c7d0964bb3a.tar.gz
pbs2-9589f87e6f9f9d4b6b80aed33d978c7d0964bb3a.tar.xz
pbs2-9589f87e6f9f9d4b6b80aed33d978c7d0964bb3a.zip
groupController Redirects && Graph editiert
-rw-r--r--application/modules/user/controllers/GroupController.php14
-rw-r--r--application/modules/user/views/scripts/group/index.phtml2
-rw-r--r--library/Pbs/Graph.php4
3 files changed, 13 insertions, 7 deletions
diff --git a/application/modules/user/controllers/GroupController.php b/application/modules/user/controllers/GroupController.php
index bb39287..d3afec9 100644
--- a/application/modules/user/controllers/GroupController.php
+++ b/application/modules/user/controllers/GroupController.php
@@ -111,6 +111,12 @@ class User_GroupController extends Zend_Controller_Action
if ($addForm->isValid($_POST)) {
$group = new Application_Model_Group($_POST);
+
+ $db = $this->groupMapper->findBy(array('title'=>$group->getTitle()));
+ if(count($db)>=1){
+ $this->_redirect('/user/group/index/page/'.$this->page.'/addresult/error');
+ }
+
try {
$this->groupMapper->save($group);
} catch(Zend_Exception $e)
@@ -161,7 +167,7 @@ class User_GroupController extends Zend_Controller_Action
}
}
- $this->_helper->redirector('', 'group');
+ $this->_redirect('/user/group/index/page/'.$this->page.'/addresult/ok');
return;
}
}
@@ -186,7 +192,7 @@ class User_GroupController extends Zend_Controller_Action
return;
}
if((!Pbs_Acl::checkRight('geo') && $groupID == $this->membership->getGroupID()) || ( !Pbs_Acl::checkRight('ge') && $groupID != $this->membership->getGroupID() ))
- $this->_redirect('/user/group/index/page/'.$this->page.'/deleteresult/forbidden');
+ $this->_redirect('/user/group/index/page/'.$this->page.'/modifyresult/forbidden');
if (!isset($_POST["save"])){
$group = $this->groupMapper->find($groupID);
$_POST['title'] = $group->getTitle();
@@ -205,7 +211,7 @@ class User_GroupController extends Zend_Controller_Action
echo "Message: " . $e->getMessage() . "<br/>";
return;
}
- $this->_helper->redirector('', 'group');
+ $this->_redirect('/user/group/index/page/'.$this->page.'/modifyresult/ok');
return;
}
}
@@ -389,7 +395,7 @@ class User_GroupController extends Zend_Controller_Action
if(strpos($_SERVER['HTTP_REFERER'], '/user/group/show') !== false && strpos($_SERVER['HTTP_REFERER'], '/groupID/') === false) {
$this->_helper->redirector('changemembership', 'person');
} else {
- $this->_helper->redirector('', 'group');
+ $this->_redirect('/user/group/index/page/'.$this->page.'/deleteresult/ok');
}
} else {
$this->_helper->redirector('', 'group');
diff --git a/application/modules/user/views/scripts/group/index.phtml b/application/modules/user/views/scripts/group/index.phtml
index e987ae6..54beeb8 100644
--- a/application/modules/user/views/scripts/group/index.phtml
+++ b/application/modules/user/views/scripts/group/index.phtml
@@ -3,7 +3,7 @@
<?php echo $this->searchform; ?>
<?php if(Pbs_Acl::checkRight('gc')):?>
<?php echo $this->formButton('addgroup', 'Add Group', array(
- 'onclick' => 'self.location="/user/group/add"',
+ 'onclick' => 'self.location="/user/group/add/page/'.$this->page.'"',
'class' => 'addbutton'))
?>
<?php endif;?>
diff --git a/library/Pbs/Graph.php b/library/Pbs/Graph.php
index db0a2ef..f9b236a 100644
--- a/library/Pbs/Graph.php
+++ b/library/Pbs/Graph.php
@@ -30,10 +30,10 @@ class Pbs_Graph{
@mkdir($path ,0777, true);
$this->graphstring = 'digraph groups {
- size="5,5";
+ size="7,5";
pad=0.1;
graph[ bgcolor=transparent ];
- node [ fontsize=7 height=0.15 style=filled fillcolor="#ffffffff" ];';
+ node [ style=filled fillcolor="#ffffffff" ];';
if($this->level <0)
$this->graphstring .= '"'.$this->getGroupTitle($groupID).'"';
else