From eb583ecb6b466f2485986f71fe49811282e556fe Mon Sep 17 00:00:00 2001 From: michael pereira Date: Fri, 1 Apr 2011 17:13:38 +0200 Subject: edit checks ob groupid ok ist --- .../modules/user/controllers/PrebootController.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'application/modules/user/controllers/PrebootController.php') 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()); -- cgit v1.2.3-55-g7522