From 0e017ebdc1edbbf230f0f0160f103c39ef675725 Mon Sep 17 00:00:00 2001 From: michael pereira Date: Sun, 6 Mar 2011 20:12:36 +0100 Subject: datenbank erweitert, BootMenu, Config fertig --- application/models/BootMenuMapper.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'application/models/BootMenuMapper.php') diff --git a/application/models/BootMenuMapper.php b/application/models/BootMenuMapper.php index fa9b8a7..51e85ef 100644 --- a/application/models/BootMenuMapper.php +++ b/application/models/BootMenuMapper.php @@ -32,13 +32,13 @@ class Application_Model_BootMenuMapper public function save(Application_Model_BootMenu $botmenu) { - $data = array('bootmenuID'=> $botmenu->getBootmenuID() ,'membershipID'=> $botmenu->getMembershipID() ,'title'=> $botmenu->getTitle() ,'time'=> $botmenu->getTime() ); + $data = array('bootmenuID'=> $botmenu->getID() ,'membershipID'=> $botmenu->getMembershipID(), 'groupID'=> $botmenu->getGroupID() ,'title'=> $botmenu->getTitle() ,'created'=> $botmenu->getCreated() ); if (null === ($id = $botmenu->getID()) ) { - unset($data['botmenuID']); + unset($data['bootmenuID']); $this->getDbTable()->insert($data); } else { - $this->getDbTable()->update($data, array('botmenuID = ?' => $id)); + $this->getDbTable()->update($data, array('bootmenuID = ?' => $id)); } } @@ -47,7 +47,7 @@ class Application_Model_BootMenuMapper if (null === ($id = $botmenu->getID()) ) { return; } else { - $this->getDbTable()->delete(array('botmenuID = ?' => $id)); + $this->getDbTable()->delete(array('bootmenuID = ?' => $id)); } } @@ -60,7 +60,7 @@ class Application_Model_BootMenuMapper $row = $result->current(); - $botmenu->setBootmenuID($row->bootmenuID)->setMembershipID($row->membershipID)->setTitle($row->title)->setTime($row->time); + $botmenu->setID($row->bootmenuID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setTitle($row->title)->setCreated($row->created); } public function fetchAll() @@ -70,7 +70,7 @@ class Application_Model_BootMenuMapper foreach ($resultSet as $row) { $entry = new Application_Model_BootMenu(); - $entry->setBootmenuID($row->bootmenuID)->setMembershipID($row->membershipID)->setTitle($row->title)->setTime($row->time); + $entry->setID($row->bootmenuID)->setMembershipID($row->membershipID)->setGroupID($row->groupID)->setTitle($row->title)->setCreated($row->created); $entries[] = $entry; } -- cgit v1.2.3-55-g7522