diff options
author | michael pereira | 2011-04-01 17:13:38 +0200 |
---|---|---|
committer | michael pereira | 2011-04-01 17:13:38 +0200 |
commit | eb583ecb6b466f2485986f71fe49811282e556fe (patch) | |
tree | 09b3651824c56abb47e0614a7025a10d2c690b30 /application/modules/user/controllers | |
parent | Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff) | |
download | pbs2-eb583ecb6b466f2485986f71fe49811282e556fe.tar.gz pbs2-eb583ecb6b466f2485986f71fe49811282e556fe.tar.xz pbs2-eb583ecb6b466f2485986f71fe49811282e556fe.zip |
edit checks ob groupid ok ist
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()); |