diff options
author | michael pereira | 2011-04-04 17:12:48 +0200 |
---|---|---|
committer | michael pereira | 2011-04-04 17:12:48 +0200 |
commit | 8ceb7bad18f257127ad5790a9c0ec157d7e03f4d (patch) | |
tree | a83b3d35741914087db7eb8c169c1f5c3b0bd02a /application/modules/user | |
parent | getRessoources bei Play werden angezeigt (diff) | |
download | pbs2-8ceb7bad18f257127ad5790a9c0ec157d7e03f4d.tar.gz pbs2-8ceb7bad18f257127ad5790a9c0ec157d7e03f4d.tar.xz pbs2-8ceb7bad18f257127ad5790a9c0ec157d7e03f4d.zip |
WICHTIG findBy Methode geändert & alles angepasst, siehe Ticket
Diffstat (limited to 'application/modules/user')
15 files changed, 37 insertions, 38 deletions
diff --git a/application/modules/user/controllers/AuthController.php b/application/modules/user/controllers/AuthController.php index 5d63b20..7eccc98 100644 --- a/application/modules/user/controllers/AuthController.php +++ b/application/modules/user/controllers/AuthController.php @@ -51,7 +51,7 @@ class User_AuthController extends Zend_Controller_Action if ($result->isValid()) { $this->personmapper = new Application_Model_PersonMapper(); - $result = $this->personmapper->findBy('email', Zend_Auth::getInstance()->getIdentity()); + $result = $this->personmapper->findBy(array('email' => Zend_Auth::getInstance()->getIdentity()),true); $person = new Application_Model_Person($result[0]); $person->setID($result[0]['personID']); $date = new DateTime(); @@ -122,7 +122,7 @@ class User_AuthController extends Zend_Controller_Action { if($_POST['confirmdelete']) { $auth = Zend_Auth::getInstance(); - $result = $this->personmapper->findBy('email', $auth->getIdentity()); + $result = $this->personmapper->findBy(array('email' => $auth->getIdentity()),true); $person = $result[0]; $personID = $person["personID"]; if (isset($personID)){ @@ -175,7 +175,7 @@ class User_AuthController extends Zend_Controller_Action } else if(isset($_GET['recoveryid'])) { $recoveryid = $_GET['recoveryid']; $passwordRecoveryMapper = new Application_Model_PasswordRecoveryMapper(); - $passwordRecovery = $passwordRecoveryMapper->findBy("recoveryID", $recoveryid); + $passwordRecovery = $passwordRecoveryMapper->findBy(array("recoveryID" => $recoveryid),true); if(count($passwordRecovery) > 0) { $passwordRecoveryObject = new Application_Model_PasswordRecovery(); $passwordRecoveryObject->setID($passwordRecovery[0]['personID']); @@ -202,7 +202,7 @@ class User_AuthController extends Zend_Controller_Action if ($recoverPasswordForm->isValid($_POST)) { $recoverPasswordForm->getView()->url(); $this->personmapper = new Application_Model_PersonMapper(); - $result = $this->personmapper->findBy('email', $_POST['email']); + $result = $this->personmapper->findBy(array('email' => $_POST['email']),true); $person = new Application_Model_Person($result[0]); $person->setID($result[0]['personID']); $email = $person->getEmail(); diff --git a/application/modules/user/controllers/BootisoController.php b/application/modules/user/controllers/BootisoController.php index 20f5774..63a5e38 100644 --- a/application/modules/user/controllers/BootisoController.php +++ b/application/modules/user/controllers/BootisoController.php @@ -70,7 +70,7 @@ class user_BootisoController extends Zend_Controller_Action foreach($parents as $k => $parent){ foreach($parent as $p){ - $bootiso = $this->bootisoMapper->findBy("groupID", $p); + $bootiso = $this->bootisoMapper->findBy(array("groupID" => $p)); foreach ($bootiso as $b) if($b->getPublic() - $k >= 0 ) $this->view->bootisolist[] = $b; @@ -158,7 +158,7 @@ class user_BootisoController extends Zend_Controller_Action $childgroups = count($groupgroupsMapper->getChildGroups($groupID)); $prebootMapper = new Application_Model_PreBootMapper(); - $prebootlist = $prebootMapper->findBy("groupID", $groupID); + $prebootlist = $prebootMapper->findBy(array("groupID" => $groupID)); if (!isset($_POST["createbootiso"])){ $bootisoForm = new user_Form_Bootiso(array( 'action' => 'createbootiso', @@ -226,7 +226,7 @@ class user_BootisoController extends Zend_Controller_Action $groupID = $this->membership->getGroupID(); $prebootMapper = new Application_Model_PreBootMapper(); - $prebootlist = $prebootMapper->findBy("groupID", $groupID); + $prebootlist = $prebootMapper->findBy(array("groupID" => $groupID)); $groupgroupsMapper = new Application_Model_GroupGroupsMapper(); $childgroups = count($groupgroupsMapper->getChildGroups($groupID)); diff --git a/application/modules/user/controllers/BootmenuController.php b/application/modules/user/controllers/BootmenuController.php index f20c093..2356515 100644 --- a/application/modules/user/controllers/BootmenuController.php +++ b/application/modules/user/controllers/BootmenuController.php @@ -57,7 +57,7 @@ class user_BootmenuController extends Zend_Controller_Action } - //TODO ACL Darf er BootOsMenu sehen? + //TODO ACL Darf er Bootmenus sehen? if(false) $this->_redirect('/user/index'); @@ -68,10 +68,10 @@ class user_BootmenuController extends Zend_Controller_Action if(true){ //TODO nur Bootmenus von Admins - $bootmenu = $this->bootmenuMapper->findBy('groupID', $this->membership->getGroupID()); + $bootmenu = $this->bootmenuMapper->findBy(array('groupID' => $this->membership->getGroupID())); foreach ($bootmenu as $bm){ $bootmenuID = $bm->getID(); - $bootmenuentries[$bootmenuID] = $this->bootmenuentriesMapper->findBy('bootmenuID',$bootmenuID); + $bootmenuentries[$bootmenuID] = $this->bootmenuentriesMapper->findBy(array('bootmenuID' => $bootmenuID)); foreach ($bootmenuentries[$bootmenuID] as $bootmenuentry){ $bootmenuentry->setBootosID("[".$bootmenuentry->getBootosID()."] ".$bootosMapper->find($bootmenuentry->getBootosID())->getTitle()); $bootmenuentry->setConfigID("[".$bootmenuentry->getConfigID()."] ".$configMapper->find($bootmenuentry->getConfigID())->gettitle()); @@ -79,9 +79,9 @@ class user_BootmenuController extends Zend_Controller_Action } }else{ - $bootmenu = $this->bootmenuMapper->findBy('membershipID', $this->membership->getID()); + $bootmenu = $this->bootmenuMapper->findBy(array('membershipID' => $this->membership->getID())); $bootmenuID = $bootmenu[0]->getID(); - $bootmenuentries[$bootmenuID] = $this->bootmenuentriesMapper->findBy('bootmenuID',$bootmenuID); + $bootmenuentries[$bootmenuID] = $this->bootmenuentriesMapper->findBy(array('bootmenuID' => $bootmenuID)); foreach ($bootmenuentries[$bootmenuID] as $bootmenuentry){ $bootmenuentry->setBootosID("[".$bootmenuentry->getBootosID()."] ".$bootosMapper->find($bootmenuentry->getBootosID())->getTitle()); $bootmenuentry->setConfigID("[".$bootmenuentry->getConfigID()."] ".$configMapper->find($bootmenuentry->getConfigID())->gettitle()); diff --git a/application/modules/user/controllers/BootosController.php b/application/modules/user/controllers/BootosController.php index 8121a71..69f3140 100644 --- a/application/modules/user/controllers/BootosController.php +++ b/application/modules/user/controllers/BootosController.php @@ -63,7 +63,7 @@ class user_BootosController extends Zend_Controller_Action $configMapper = new Application_Model_ConfigMapper(); - $this->view->bootoslist = $this->bootosMapper->findBy("groupID", $groupID); + $this->view->bootoslist = $this->bootosMapper->findBy(array("groupID" => $groupID)); $this->view->update = array(); @@ -112,7 +112,7 @@ class user_BootosController extends Zend_Controller_Action //TODO nur configs von admins $configMapper = new Application_Model_ConfigMapper(); - $configlist = $configMapper->findBy("groupID", $groupID); + $configlist = $configMapper->findBy(array("groupID" => $groupID)); if (!isset($_POST["createbootos"])){ $bootosForm = new user_Form_Bootos(array( @@ -271,7 +271,7 @@ class user_BootosController extends Zend_Controller_Action $childgroups = count($groupgroupsMapper->getChildGroups($groupID)); $configMapper = new Application_Model_ConfigMapper(); - $configlist = $configMapper->findBy("groupID", $groupID); + $configlist = $configMapper->findBy(array("groupID" => $groupID)); $bootos = new Application_Model_BootOs(); $bootos = $this->bootosMapper->find($bootosID); diff --git a/application/modules/user/controllers/ClientController.php b/application/modules/user/controllers/ClientController.php index 5827d03..e26075b 100644 --- a/application/modules/user/controllers/ClientController.php +++ b/application/modules/user/controllers/ClientController.php @@ -47,7 +47,7 @@ class User_ClientController extends Zend_Controller_Action } $clientMapper = new Application_Model_ClientMapper(); - $clientsInGroup = $clientMapper->findBy('groupID',$this->membership->getGroupID()); + $clientsInGroup = $clientMapper->findBy(array('groupID' => $this->membership->getGroupID()),true); $perpage = 10; diff --git a/application/modules/user/controllers/ConfigController.php b/application/modules/user/controllers/ConfigController.php index 3618901..f00d1bc 100644 --- a/application/modules/user/controllers/ConfigController.php +++ b/application/modules/user/controllers/ConfigController.php @@ -57,9 +57,9 @@ class user_ConfigController extends Zend_Controller_Action if(true){ //TODO nur Configs von Admins - $this->view->configlist = $this->configMapper->findBy('groupID', $this->membership->getGroupID()); + $this->view->configlist = $this->configMapper->findBy(array('groupID' => $this->membership->getGroupID())); }else{ - $this->view->configlist = $this->configMapper->findBy('membershipID', $this->membership->getID()); + $this->view->configlist = $this->configMapper->findBy(array('membershipID' => $this->membership->getID())); } foreach ($this->view->configlist as $config){ diff --git a/application/modules/user/controllers/FilterController.php b/application/modules/user/controllers/FilterController.php index b1bc84f..83ccdc4 100644 --- a/application/modules/user/controllers/FilterController.php +++ b/application/modules/user/controllers/FilterController.php @@ -48,7 +48,7 @@ class User_FilterController extends Zend_Controller_Action $this->view->notification = $pbsNotifier->notify('modify',$result); } - $filters = $this->filterMapper->findBy('groupID',$this->membership->getGroupID(),'priority','DESC'); + $filters = $this->filterMapper->findBy(array('groupID' => $this->membership->getGroupID()),true,'priority','DESC'); foreach($filters as $filter){ $ff = new Application_Model_Filter(); $ff->setOptions($filter); @@ -79,7 +79,7 @@ class User_FilterController extends Zend_Controller_Action $this->_redirect('/user'); $bmmapper = new Application_Model_BootMenuMapper(); - $result = $bmmapper->findBy('groupID',$this->membership->getGroupID(),true); + $result = $bmmapper->findBy(array('groupID' => $this->membership->getGroupID()),true); print_a($result); foreach($result as $rr){ @@ -158,7 +158,7 @@ class User_FilterController extends Zend_Controller_Action public function editfilterAction() { $bmmapper = new Application_Model_BootMenuMapper(); - $result = $bmmapper->findBy('groupID',$this->membership->getGroupID(),true); + $result = $bmmapper->findBy(array('groupID' => $this->membership->getGroupID()),true); foreach($result as $rr){ $bm = new Application_Model_BootMenu(); $bm->setOptions($rr); diff --git a/application/modules/user/controllers/GroupController.php b/application/modules/user/controllers/GroupController.php index 7a21aa9..76639bd 100644 --- a/application/modules/user/controllers/GroupController.php +++ b/application/modules/user/controllers/GroupController.php @@ -129,7 +129,7 @@ class User_GroupController extends Zend_Controller_Action } } if($groupID) { - $groupRequests = $this->groupRequestMapper->findBy('groupID', $groupID); + $groupRequests = $this->groupRequestMapper->findBy(array('groupID' => $groupID),true); if(isset($groupRequests)) { foreach($groupRequests as $groupRequest) { $person = $this->personmapper->find($groupRequest['personID']); @@ -141,9 +141,9 @@ class User_GroupController extends Zend_Controller_Action if(is_array($groupRequestList)) { $this->view->groupRequestList = $groupRequestList; } - $this->view->roleList = $this->rolemapper->findBy('groupID', $groupID); + $this->view->roleList = $this->rolemapper->findBy(array('groupID' => $groupID),true); } - $members = $this->membershipMapper->findBy('groupID', $groupID); + $members = $this->membershipMapper->findBy(array('groupID' => $groupID),true); if(isset($members)) { foreach($members as $member) { $person = $this->personmapper->find($member['personID']); @@ -156,7 +156,7 @@ class User_GroupController extends Zend_Controller_Action $this->view->membersList = $membersList; } } - $groupgroups = $this->groupGroupsMapper->findBy('groupID', $groupID); + $groupgroups = $this->groupGroupsMapper->findBy(array('groupID' => $groupID),true); if(is_object($groupgroups)) { $parentGroup = $this->groupMapper->find($groupgroups->getParentID()); $this->view->$parentGroup = $parentGroup; diff --git a/application/modules/user/controllers/PersonController.php b/application/modules/user/controllers/PersonController.php index 62d3b6b..e614b98 100644 --- a/application/modules/user/controllers/PersonController.php +++ b/application/modules/user/controllers/PersonController.php @@ -15,13 +15,13 @@ class user_PersonController extends Zend_Controller_Action { if (Zend_Auth::getInstance()->hasIdentity()) { $this->personmapper = new Application_Model_PersonMapper(); - $result = $this->personmapper->findBy('email', Zend_Auth::getInstance()->getIdentity()); + $result = $this->personmapper->findBy(array('email' => Zend_Auth::getInstance()->getIdentity()),true); $this->person = new Application_Model_Person($result[0]); $this->person->setID($result[0]['personID']); $this->groupMapper = new Application_Model_GroupMapper(); $this->groupRequestMapper = new Application_Model_GroupRequestMapper(); $this->membershipMapper = new Application_Model_MembershipMapper(); - $this->memberships = $this->membershipMapper->findBy("personID",$this->person->getID()); + $this->memberships = $this->membershipMapper->findBy(array("personID" => $this->person->getID()),true); if(isset($this->memberships)) { foreach($this->memberships as $membership) { $group = $this->groupMapper->find($membership['groupID']); @@ -91,7 +91,7 @@ class user_PersonController extends Zend_Controller_Action } $this->view->person = $this->person; $allgroups = $this->groupMapper->fetchAll(); - $groupRequests = $this->groupRequestMapper->findBy('personID', $this->person->getID()); + $groupRequests = $this->groupRequestMapper->findBy(array('personID' => $this->person->getID()),true); $count = 0; foreach($allgroups as $group) { foreach($groupRequests as $groupRequest) { diff --git a/application/modules/user/controllers/PoolController.php b/application/modules/user/controllers/PoolController.php index d5cab09..7bf3446 100644 --- a/application/modules/user/controllers/PoolController.php +++ b/application/modules/user/controllers/PoolController.php @@ -57,7 +57,7 @@ class User_PoolController extends Zend_Controller_Action // get all pools from this group $poolMapper = new Application_Model_PoolMapper(); - $pools = $poolMapper->findBy('groupID',$this->membership->getGroupID()); + $pools = $poolMapper->findBy(array('groupID' => $this->membership->getGroupID()),true); foreach($pools as $pool){ $ff = new Application_Model_Pool(); $ff->setOptions($pool); @@ -81,7 +81,7 @@ class User_PoolController extends Zend_Controller_Action // Get all Clients from this group $clientmapper = new Application_Model_ClientMapper(); - $clientsArray = $clientmapper->findBy('groupID',$this->membership->getGroupID()); + $clientsArray = $clientmapper->findBy(array('groupID' => $this->membership->getGroupID()),true); // Get all assigned Clients $assignedclientmapper = new Application_Model_PoolEntriesMapper(); @@ -216,7 +216,7 @@ class User_PoolController extends Zend_Controller_Action if(!isset($_POST['clientID']) && ($clientID == '')){ $clientmapper = new Application_Model_ClientMapper(); - $clients = $clientmapper->findBy('groupID',$this->membership->getGroupID()); + $clients = $clientmapper->findBy(array('groupID',$this->membership->getGroupID()),true); $assignedclientmapper = new Application_Model_PoolEntriesMapper(); $assignedclients = $assignedclientmapper->fetchAll(); foreach($assignedclients as $c){ diff --git a/application/modules/user/controllers/PrebootController.php b/application/modules/user/controllers/PrebootController.php index b4382cf..73e838d 100644 --- a/application/modules/user/controllers/PrebootController.php +++ b/application/modules/user/controllers/PrebootController.php @@ -62,7 +62,7 @@ class User_PrebootController extends Zend_Controller_Action if(false) $this->_redirect('/user/index'); - $this->view->prebootlist = $this->prebootMapper->findBy("groupID", $groupID); + $this->view->prebootlist = $this->prebootMapper->findBy(array("groupID" => $groupID)); // Pagination $perpage = 2; diff --git a/application/modules/user/controllers/RoleController.php b/application/modules/user/controllers/RoleController.php index 6246c9d..059d9c4 100644 --- a/application/modules/user/controllers/RoleController.php +++ b/application/modules/user/controllers/RoleController.php @@ -23,7 +23,7 @@ class User_RoleController extends Zend_Controller_Action public function indexAction() { if(isset($this->userIDsNamespace['groupID'])) { - $roleList = $this->roleMapper->findBy('groupID', $this->userIDsNamespace['groupID']); + $roleList = $this->roleMapper->findBy(array('groupID' => $this->userIDsNamespace['groupID']),true); $this->view->roleList = $roleList; $this->view->userIDsNamespace = $this->userIDsNamespace; } else { @@ -153,7 +153,7 @@ class User_RoleController extends Zend_Controller_Action $role = $roleMapper->find($roleID); $roleGroupID = $role->getGroupID(); if($this->userIDsNamespace['groupID'] == $roleGroupID) { - $rightroles = $this->rightRolesMapper->findBy('roleID', $roleID); + $rightroles = $this->rightRolesMapper->findBy(array('roleID' => $roleID),true); if(count($rightroles) > 0) { foreach($rightroles as $rightrole) { $right = $this->rightMapper->find($rightrole['rightID']); @@ -242,7 +242,7 @@ class User_RoleController extends Zend_Controller_Action $role = $roleMapper->find($roleID); $roleGroupID = $role->getGroupID(); if($this->userIDsNamespace['groupID'] == $roleGroupID) { - $rightroles = $this->rightRolesMapper->findBy('roleID', $roleID); + $rightroles = $this->rightRolesMapper->findBy(array('roleID' => $roleID),true); $rights = $this->rightMapper->fetchAll(); if(count($rightroles) > 0) { if(count($rights) > 0) { diff --git a/application/modules/user/views/scripts/bootmenu/index.phtml b/application/modules/user/views/scripts/bootmenu/index.phtml index 5f150aa..a43a058 100644 --- a/application/modules/user/views/scripts/bootmenu/index.phtml +++ b/application/modules/user/views/scripts/bootmenu/index.phtml @@ -4,7 +4,6 @@ 'onclick' => 'self.location="/user/bootmenu/createbootmenu/page/'.$this->page.'"', 'class' => 'addbutton'))?> - <table> <tr> <th>ID</th> diff --git a/application/modules/user/views/scripts/filter/index.phtml b/application/modules/user/views/scripts/filter/index.phtml index 1716a95..9800d42 100644 --- a/application/modules/user/views/scripts/filter/index.phtml +++ b/application/modules/user/views/scripts/filter/index.phtml @@ -55,7 +55,7 @@ <?php $fe = new Application_Model_FilterEntriesMapper(); # print_a($erg = $fe->findBy('filterID',$filter->getID())); - $erg = $fe->findBy('filterID',$filter->getID()); + $erg = $fe->findBy(array('filterID' => $filter->getID()),true); ?> <?php if (count($erg)>0): ?> <tr class=detail> diff --git a/application/modules/user/views/scripts/pool/index.phtml b/application/modules/user/views/scripts/pool/index.phtml index 4d224a1..80053f2 100644 --- a/application/modules/user/views/scripts/pool/index.phtml +++ b/application/modules/user/views/scripts/pool/index.phtml @@ -52,7 +52,7 @@ </tr> <?php $poolentriesMapper = new Application_Model_PoolEntriesMapper(); - $clients = $poolentriesMapper->findBy('poolID',$pool->getID()); + $clients = $poolentriesMapper->findBy(array('poolID' => $pool->getID()),true); ?> <?php if (count($clients)>0): ?> <tr class=detail> |