diff options
Diffstat (limited to 'application/modules/user/controllers')
3 files changed, 18 insertions, 18 deletions
diff --git a/application/modules/user/controllers/BootisoController.php b/application/modules/user/controllers/BootisoController.php index ad3244a..20f5774 100644 --- a/application/modules/user/controllers/BootisoController.php +++ b/application/modules/user/controllers/BootisoController.php @@ -231,14 +231,14 @@ class user_BootisoController extends Zend_Controller_Action $groupgroupsMapper = new Application_Model_GroupGroupsMapper(); $childgroups = count($groupgroupsMapper->getChildGroups($groupID)); - if (!isset($_POST["editbootiso"])){ - - $bootiso = new Application_Model_BootIso(); - $this->bootisoMapper->find($bootisoID, $bootiso); + $bootiso = new Application_Model_BootIso(); + $this->bootisoMapper->find($bootisoID, $bootiso); - if($this->membership->getGroupID() != $bootiso->getGroupID()) - $this->_redirect('/user/bootiso/index/page/'.$this->page.'/modifyresult/forbidden'); - + if($this->membership->getGroupID() != $bootiso->getGroupID()) + $this->_redirect('/user/bootiso/index/page/'.$this->page.'/modifyresult/forbidden'); + + if (!isset($_POST["editbootiso"])){ + $bootisoForm = new user_Form_Bootiso(array( 'action' => 'editbootiso', 'prebootlist' => $prebootlist, @@ -257,8 +257,7 @@ class user_BootisoController extends Zend_Controller_Action if ($bootisoForm->isValid($_POST)) { - $bootisoold = new Application_Model_BootIso(); - $this->bootisoMapper->find($bootisoID, $bootisoold); + $bootisoold = $bootiso; $bootiso = new Application_Model_BootIso($_POST); $bootiso->setMembershipID($this->membership->getID()); diff --git a/application/modules/user/controllers/BootmenuController.php b/application/modules/user/controllers/BootmenuController.php index 79c3ee7..ea8cfd3 100644 --- a/application/modules/user/controllers/BootmenuController.php +++ b/application/modules/user/controllers/BootmenuController.php @@ -166,6 +166,7 @@ class user_BootmenuController extends Zend_Controller_Action $bootmenu = new Application_Model_BootMenu($_POST); $bootmenu->setMembershipID($this->membership->getID()); + $bootmenu->setGroupID($this->membership->getGroupID()); $bootmenu->setCreated(time()); $bootmenu->setID($bootmenuID); diff --git a/application/modules/user/controllers/PrebootController.php b/application/modules/user/controllers/PrebootController.php index f8c8ba7..b4382cf 100644 --- a/application/modules/user/controllers/PrebootController.php +++ b/application/modules/user/controllers/PrebootController.php @@ -256,14 +256,15 @@ class User_PrebootController extends Zend_Controller_Action if (!is_numeric($prebootID)) $this->_redirect('/user/preboot/index/page/'.$this->page.'/modifyresult/forbidden'); - if (!isset($_POST["editpreboot"])){ - - $preboot = new Application_Model_PreBoot(); - $this->prebootMapper->find($prebootID, $preboot); + + $preboot = new Application_Model_PreBoot(); + $this->prebootMapper->find($prebootID, $preboot); - if($this->membership->getGroupID() != $preboot->getGroupID()) - $this->_redirect('/user/preboot/index/page/'.$this->page.'/modifyresult/forbidden'); - + if($this->membership->getGroupID() != $preboot->getGroupID()) + $this->_redirect('/user/preboot/index/page/'.$this->page.'/modifyresult/forbidden'); + + if (!isset($_POST["editpreboot"])){ + $prebootForm = new user_Form_Preboot(array( 'action' => 'editpreboot', 'rights' => 'meta', @@ -279,8 +280,7 @@ class User_PrebootController extends Zend_Controller_Action if ($prebootForm->isValid($_POST)) { - $prebootold = new Application_Model_PreBoot(); - $this->prebootMapper->find($prebootID, $prebootold); + $prebootold = $preboot; $preboot = new Application_Model_PreBoot($_POST); $preboot->setMembershipID($this->membership->getID()); |