diff options
Diffstat (limited to 'application/models/BootIsoMapper.php')
| -rw-r--r-- | application/models/BootIsoMapper.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/application/models/BootIsoMapper.php b/application/models/BootIsoMapper.php index 559f41e..624940b 100644 --- a/application/models/BootIsoMapper.php +++ b/application/models/BootIsoMapper.php @@ -35,10 +35,19 @@ class Application_Model_BootIsoMapper $data = array('bootisoID'=> $botiso->getBootisoID() ,'membershipID'=> $botiso->getMembershipID() ,'groupID'=> $botiso->getGroupID() ,'serialnumber'=> $botiso->getSerialnumber() ,'created'=> $botiso->getCreated() ,'expires'=> $botiso->getExpires() ,'public'=> $botiso->getPublic() ); if (null === ($id = $botiso->getID()) ) { - unset($data['id']); + unset($data['botisoID']); $this->getDbTable()->insert($data); } else { - $this->getDbTable()->update($data, array('id = ?' => $id)); + $this->getDbTable()->update($data, array('botisoID = ?' => $id)); + } + } + + public function delete(Application_Model_BootIso $botiso) + { + if (null === ($id = $botiso->getID()) ) { + return; + } else { + $this->getDbTable()->delete(array('botisoID = ?' => $id)); } } |
