diff options
author | michael pereira | 2011-04-01 16:46:47 +0200 |
---|---|---|
committer | michael pereira | 2011-04-01 16:46:47 +0200 |
commit | 00a1bcc61d4b5c1e28b14c018332a934100e227f (patch) | |
tree | 80ab563e840cd6305f8bc6974e89f57352badef1 /application/modules/user/controllers/BootosController.php | |
parent | Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff) | |
download | pbs2-00a1bcc61d4b5c1e28b14c018332a934100e227f.tar.gz pbs2-00a1bcc61d4b5c1e28b14c018332a934100e227f.tar.xz pbs2-00a1bcc61d4b5c1e28b14c018332a934100e227f.zip |
Bootmenu & BootOs Controller
Diffstat (limited to 'application/modules/user/controllers/BootosController.php')
-rw-r--r-- | application/modules/user/controllers/BootosController.php | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/application/modules/user/controllers/BootosController.php b/application/modules/user/controllers/BootosController.php index eae0dcf..0a1f41f 100644 --- a/application/modules/user/controllers/BootosController.php +++ b/application/modules/user/controllers/BootosController.php @@ -265,14 +265,14 @@ 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/'.$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/'.$page.'/modifyresult/forbidden'); - $bootosForm = new user_Form_Bootos(array('action' => 'editbootos', 'groupdepth' => $childgroups, 'configlist'=>$configlist, 'rights' => 'meta')); $bootosForm->populate($bootos->toArray()); @@ -281,8 +281,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()); |