summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers
diff options
context:
space:
mode:
authormichael pereira2011-04-26 10:59:15 +0200
committermichael pereira2011-04-26 10:59:15 +0200
commitcd54d29288e6d4f0085beec47d3dc257774e6659 (patch)
tree124480bfe99570c091643960c70b3555e42c75dc /application/modules/user/controllers
parenthome on usb and draggable bootmenulist (diff)
parentgroupController Redirects && Graph editiert (diff)
downloadpbs2-cd54d29288e6d4f0085beec47d3dc257774e6659.tar.gz
pbs2-cd54d29288e6d4f0085beec47d3dc257774e6659.tar.xz
pbs2-cd54d29288e6d4f0085beec47d3dc257774e6659.zip
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
Diffstat (limited to 'application/modules/user/controllers')
-rw-r--r--application/modules/user/controllers/GroupController.php14
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');