summaryrefslogtreecommitdiffstats
path: root/application/models/BootOsMapper.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/models/BootOsMapper.php')
-rw-r--r--application/models/BootOsMapper.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/application/models/BootOsMapper.php b/application/models/BootOsMapper.php
index 87d4d6c..0c5d30f 100644
--- a/application/models/BootOsMapper.php
+++ b/application/models/BootOsMapper.php
@@ -35,10 +35,19 @@ class Application_Model_BootOsMapper
$data = array('bootisoID'=> $botos->getBootisoID() ,'membershipID'=> $botos->getMembershipID() ,'groupID'=> $botos->getGroupID() ,'serialnumber'=> $botos->getSerialnumber() ,'created'=> $botos->getCreated() ,'expires'=> $botos->getExpires() ,'public'=> $botos->getPublic() );
if (null === ($id = $botos->getID()) ) {
- unset($data['id']);
+ unset($data['botosID']);
$this->getDbTable()->insert($data);
} else {
- $this->getDbTable()->update($data, array('id = ?' => $id));
+ $this->getDbTable()->update($data, array('botosID = ?' => $id));
+ }
+ }
+
+ public function delete(Application_Model_BootOs $botos)
+ {
+ if (null === ($id = $botos->getID()) ) {
+ return;
+ } else {
+ $this->getDbTable()->delete(array('botosID = ?' => $id));
}
}