diff options
| author | michael pereira | 2011-03-05 13:12:23 +0100 |
|---|---|---|
| committer | michael pereira | 2011-03-05 13:12:23 +0100 |
| commit | 92e5b7a7b6bb780ef5e788b7711f8a999ac80f41 (patch) | |
| tree | 9886c2229205ea8478e9a0bf0ca9fc5fb8de68e8 /application/models/BootOsMapper.php | |
| parent | Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff) | |
| download | pbs2-92e5b7a7b6bb780ef5e788b7711f8a999ac80f41.tar.gz pbs2-92e5b7a7b6bb780ef5e788b7711f8a999ac80f41.tar.xz pbs2-92e5b7a7b6bb780ef5e788b7711f8a999ac80f41.zip | |
bootos v1
Diffstat (limited to 'application/models/BootOsMapper.php')
| -rw-r--r-- | application/models/BootOsMapper.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/application/models/BootOsMapper.php b/application/models/BootOsMapper.php index 0c5d30f..9807911 100644 --- a/application/models/BootOsMapper.php +++ b/application/models/BootOsMapper.php @@ -31,14 +31,12 @@ class Application_Model_BootOsMapper public function save(Application_Model_BootOs $botos) { - - $data = array('bootisoID'=> $botos->getBootisoID() ,'membershipID'=> $botos->getMembershipID() ,'groupID'=> $botos->getGroupID() ,'serialnumber'=> $botos->getSerialnumber() ,'created'=> $botos->getCreated() ,'expires'=> $botos->getExpires() ,'public'=> $botos->getPublic() ); - + $data = array('bootosID'=> $botos->getID() ,'configID'=> $botos->getConfigID() ,'groupID'=> $botos->getGroupID() ,'title'=> $botos->getTitle() ,'path_init'=> $botos->getPath_init() ,'path_kernel'=> $botos->getPath_kernel() ,'defaultkcl'=> $botos->getDefaultkcl() ,'created'=> $botos->getCreated() ,'description'=> $botos->getDescription() ,'expires'=> $botos->getExpires() ,'public'=> $botos->getPublic() ); if (null === ($id = $botos->getID()) ) { - unset($data['botosID']); + unset($data['bootosID']); $this->getDbTable()->insert($data); } else { - $this->getDbTable()->update($data, array('botosID = ?' => $id)); + $this->getDbTable()->update($data, array('bootosID = ?' => $id)); } } @@ -47,7 +45,7 @@ class Application_Model_BootOsMapper if (null === ($id = $botos->getID()) ) { return; } else { - $this->getDbTable()->delete(array('botosID = ?' => $id)); + $this->getDbTable()->delete(array('bootosID = ?' => $id)); } } @@ -60,7 +58,7 @@ class Application_Model_BootOsMapper $row = $result->current(); - $botos->setBootisoID($row->bootisoID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setSerialnumber($row->serialnumber)->setCreated($row->created)->setExpires($row->expires)->setPublic($row->public); + $botos->setID($row->bootosID)->setConfigID($row->configID)->setGroupID($row->groupID)->setTitle($row->title)->setPath_init($row->path_init)->setPath_kernel($row->path_kernel)->setDefaultkcl($row->defaultkcl)->setCreated($row->created)->setDescription($row->description)->setExpires($row->expires)->setPublic($row->public); } public function fetchAll() @@ -70,7 +68,7 @@ class Application_Model_BootOsMapper foreach ($resultSet as $row) { $entry = new Application_Model_BootOs(); - $entry->setBootisoID($row->bootisoID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setSerialnumber($row->serialnumber)->setCreated($row->created)->setExpires($row->expires)->setPublic($row->public); + $entry->setID($row->bootosID)->setConfigID($row->configID)->setGroupID($row->groupID)->setTitle($row->title)->setPath_init($row->path_init)->setPath_kernel($row->path_kernel)->setDefaultkcl($row->defaultkcl)->setCreated($row->created)->setDescription($row->description)->setExpires($row->expires)->setPublic($row->public); $entries[] = $entry; } |
