diff options
| author | Björn Geiger | 2011-04-05 17:36:16 +0200 |
|---|---|---|
| committer | Björn Geiger | 2011-04-05 17:36:16 +0200 |
| commit | e0935357c77f0fbeea2b0ffaec447d3521368006 (patch) | |
| tree | 6009c5511dfbf6dba493baed536212b23d2cfc4f /application/models/BootMenuMapper.php | |
| parent | Paging bei Person, Group und Role (diff) | |
| parent | recht für superadmin vergessen (diff) | |
| download | pbs2-e0935357c77f0fbeea2b0ffaec447d3521368006.tar.gz pbs2-e0935357c77f0fbeea2b0ffaec447d3521368006.tar.xz pbs2-e0935357c77f0fbeea2b0ffaec447d3521368006.zip | |
Merge branch 'master' of ssh://git.openslx.org/lsfks/master-teamprojekt/pbs2
Diffstat (limited to 'application/models/BootMenuMapper.php')
| -rw-r--r-- | application/models/BootMenuMapper.php | 13 |
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() |
