summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers/PrebootController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/user/controllers/PrebootController.php')
-rw-r--r--application/modules/user/controllers/PrebootController.php18
1 files changed, 9 insertions, 9 deletions
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());