diff options
| author | Simon | 2011-04-25 19:20:24 +0200 |
|---|---|---|
| committer | Simon | 2011-04-25 19:20:24 +0200 |
| commit | 9589f87e6f9f9d4b6b80aed33d978c7d0964bb3a (patch) | |
| tree | 1a6750d9df279415008551079c5924a7d5394230 /application/modules/user/controllers | |
| parent | graphsize limited (diff) | |
| download | pbs2-9589f87e6f9f9d4b6b80aed33d978c7d0964bb3a.tar.gz pbs2-9589f87e6f9f9d4b6b80aed33d978c7d0964bb3a.tar.xz pbs2-9589f87e6f9f9d4b6b80aed33d978c7d0964bb3a.zip | |
groupController Redirects && Graph editiert
Diffstat (limited to 'application/modules/user/controllers')
| -rw-r--r-- | application/modules/user/controllers/GroupController.php | 14 |
1 files changed, 10 insertions, 4 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'); |
