summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers/BootosController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/user/controllers/BootosController.php')
-rw-r--r--application/modules/user/controllers/BootosController.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/application/modules/user/controllers/BootosController.php b/application/modules/user/controllers/BootosController.php
index 5757d16..8121a71 100644
--- a/application/modules/user/controllers/BootosController.php
+++ b/application/modules/user/controllers/BootosController.php
@@ -273,20 +273,21 @@ class user_BootosController extends Zend_Controller_Action
$configMapper = new Application_Model_ConfigMapper();
$configlist = $configMapper->findBy("groupID", $groupID);
+ $bootos = new Application_Model_BootOs();
+ $bootos = $this->bootosMapper->find($bootosID);
+
+ if($this->membership->getGroupID() != $bootos->getGroupID())
+ $this->_redirect('/user/bootos/index/page/'.$this->page.'/modifyresult/forbidden');
+
if (!isset($_POST["editbootos"])){
-
- $bootos = new Application_Model_BootOs();
- $bootos = $this->bootosMapper->find($bootosID);
- if($this->membership->getGroupID() != $bootos->getGroupID())
- $this->_redirect('/user/bootos/index/page/'.$this->page.'/modifyresult/forbidden');
-
$bootosForm = new user_Form_Bootos(array(
'action' => 'editbootos',
'groupdepth' => $childgroups,
'configlist'=>$configlist,
'rights' => 'meta',
'page' => $this->page));
+
$bootosForm->populate($bootos->toArray());
}else{
@@ -299,8 +300,7 @@ class user_BootosController extends Zend_Controller_Action
if ($bootosForm->isValid($_POST)) {
- $bootosold = new Application_Model_BootOs();
- $this->bootosMapper->find($bootosID, $bootosold);
+ $bootosold = $bootos;
$bootos = new Application_Model_BootOs($_POST);
$bootos->setMembershipID($this->membership->getID());