diff options
| author | michael pereira | 2011-03-04 03:21:32 +0100 |
|---|---|---|
| committer | michael pereira | 2011-03-04 03:21:32 +0100 |
| commit | e2db1dc442e9f28fe666537a8af024c810912bb4 (patch) | |
| tree | de16d36dff50a950dd963788689e18576a6db02f /createDefaultMapper/mappertemplate | |
| parent | Inserted deleteForm (diff) | |
| parent | Änderungen an den Filtern (diff) | |
| download | pbs2-e2db1dc442e9f28fe666537a8af024c810912bb4.tar.gz pbs2-e2db1dc442e9f28fe666537a8af024c810912bb4.tar.xz pbs2-e2db1dc442e9f28fe666537a8af024c810912bb4.zip | |
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
Conflicts:
.zfproject.xml
Diffstat (limited to 'createDefaultMapper/mappertemplate')
| -rw-r--r-- | createDefaultMapper/mappertemplate | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/createDefaultMapper/mappertemplate b/createDefaultMapper/mappertemplate index 62de1eb..c7c857e 100644 --- a/createDefaultMapper/mappertemplate +++ b/createDefaultMapper/mappertemplate @@ -35,10 +35,19 @@ class Application_Model_MAPPER $data = array(SAVEDATA); if (null === ($id = $MVAR->getID()) ) { - unset($data['id']); + unset($data['MVARID']); $this->getDbTable()->insert($data); } else { - $this->getDbTable()->update($data, array('id = ?' => $id)); + $this->getDbTable()->update($data, array('MVARID = ?' => $id)); + } + } + + public function delete(Application_Model_MODEL $MVAR) + { + if (null === ($id = $MVAR->getID()) ) { + return; + } else { + $this->getDbTable()->delete(array('MVARID = ?' => $id)); } } |
