summaryrefslogtreecommitdiffstats
path: root/application/models/BootMenuMapper.php
diff options
context:
space:
mode:
authorSimon2011-04-05 16:27:15 +0200
committerSimon2011-04-05 16:27:15 +0200
commit8025728274992a9b2d7816bc986f86aac15e9383 (patch)
tree1ceb34a8a0a0506d97f707e733bb30438c2f5210 /application/models/BootMenuMapper.php
parentSuche gefixt & Neues Recht für Session (diff)
parentRechte in Alle Controller (diff)
downloadpbs2-8025728274992a9b2d7816bc986f86aac15e9383.tar.gz
pbs2-8025728274992a9b2d7816bc986f86aac15e9383.tar.xz
pbs2-8025728274992a9b2d7816bc986f86aac15e9383.zip
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
Diffstat (limited to 'application/models/BootMenuMapper.php')
-rw-r--r--application/models/BootMenuMapper.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/application/models/BootMenuMapper.php b/application/models/BootMenuMapper.php
index 60c506d..1043897 100644
--- a/application/models/BootMenuMapper.php
+++ b/application/models/BootMenuMapper.php
@@ -93,16 +93,23 @@ class Application_Model_BootMenuMapper
}
}
- public function find($id, Application_Model_BootMenu $botmenu)
+ public function find($id, Application_Model_BootMenu $botmenu = null)
{
$result = $this->getDbTable()->find($id);
if (0 == count($result)) {
return;
}
-
$row = $result->current();
- $botmenu->setID($row->bootmenuID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setTitle($row->title)->setCreated($row->created);
+ if($botmenu == null){
+ $botmenu = new Application_Model_BootMenu();
+ $botmenu->setID($row->bootmenuID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setTitle($row->title)->setCreated($row->created);
+ return $botmenu;
+ }else{
+ $botmenu->setID($row->bootmenuID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setTitle($row->title)->setCreated($row->created);
+ }
+
+
}
public function fetchAll()