summaryrefslogtreecommitdiffstats
path: root/application/models/GroupGroupsMapper.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/models/GroupGroupsMapper.php')
-rw-r--r--application/models/GroupGroupsMapper.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/application/models/GroupGroupsMapper.php b/application/models/GroupGroupsMapper.php
index dce6a5a..79bf774 100644
--- a/application/models/GroupGroupsMapper.php
+++ b/application/models/GroupGroupsMapper.php
@@ -35,10 +35,19 @@ class Application_Model_GroupGroupsMapper
$data = array('parentID'=> $groupgroups->getParentID() ,'groupID'=> $groupgroups->getGroupID() );
if (null === ($id = $groupgroups->getID()) ) {
- unset($data['id']);
+ unset($data['groupgroupsID']);
$this->getDbTable()->insert($data);
} else {
- $this->getDbTable()->update($data, array('id = ?' => $id));
+ $this->getDbTable()->update($data, array('groupgroupsID = ?' => $id));
+ }
+ }
+
+ public function delete(Application_Model_GroupGroups $groupgroups)
+ {
+ if (null === ($id = $groupgroups->getID()) ) {
+ return;
+ } else {
+ $this->getDbTable()->delete(array('groupgroupsID = ?' => $id));
}
}