diff options
Diffstat (limited to 'application/models/BootMenuEntriesMapper.php')
| -rw-r--r-- | application/models/BootMenuEntriesMapper.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/application/models/BootMenuEntriesMapper.php b/application/models/BootMenuEntriesMapper.php index 4d82c96..02c5e07 100644 --- a/application/models/BootMenuEntriesMapper.php +++ b/application/models/BootMenuEntriesMapper.php @@ -119,7 +119,7 @@ class Application_Model_BootMenuEntriesMapper } } - public function find($id, Application_Model_BootMenuEntries $botmenuentries) + public function find($id, Application_Model_BootMenuEntries $botmenuentries = null) { $result = $this->getDbTable()->find($id); if (0 == count($result)) { @@ -128,8 +128,13 @@ class Application_Model_BootMenuEntriesMapper $row = $result->current(); - $botmenuentries->setID($row->bootmenuentriesID)->setBootosID($row->bootosID)->setBootmenuID($row->bootmenuID)->setTitle($row->title)->setConfigID($row->configID)->setKcl($row->kcl)->setKclappend($row->kclappend)->setOrder($row->order); - + if($botmenuentries == null){ + $botmenuentries = new Application_Model_BootMenuEntriesMapper(); + $botmenuentries->setID($row->bootmenuentriesID)->setBootosID($row->bootosID)->setBootmenuID($row->bootmenuID)->setTitle($row->title)->setConfigID($row->configID)->setKcl($row->kcl)->setKclappend($row->kclappend)->setOrder($row->order); + return $botmenuentries; + }else{ + $botmenuentries->setID($row->bootmenuentriesID)->setBootosID($row->bootosID)->setBootmenuID($row->bootmenuID)->setTitle($row->title)->setConfigID($row->configID)->setKcl($row->kcl)->setKclappend($row->kclappend)->setOrder($row->order); + } } public function fetchAll() |
