summaryrefslogtreecommitdiffstats
path: root/application/models/PoolMapper.php
diff options
context:
space:
mode:
authormichael pereira2011-03-06 20:12:43 +0100
committermichael pereira2011-03-06 20:12:43 +0100
commitc2e050df18557a3fe1093f0fef1685c2e631b95b (patch)
tree532672f37cf928d0c2c81b6e3d55fd8cda7e393d /application/models/PoolMapper.php
parentdatenbank erweitert, BootMenu, Config fertig (diff)
parentPool add, edit und remove hinzugefügt (diff)
downloadpbs2-c2e050df18557a3fe1093f0fef1685c2e631b95b.tar.gz
pbs2-c2e050df18557a3fe1093f0fef1685c2e631b95b.tar.xz
pbs2-c2e050df18557a3fe1093f0fef1685c2e631b95b.zip
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
Diffstat (limited to 'application/models/PoolMapper.php')
-rw-r--r--application/models/PoolMapper.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/application/models/PoolMapper.php b/application/models/PoolMapper.php
index f9be34f..e2d351a 100644
--- a/application/models/PoolMapper.php
+++ b/application/models/PoolMapper.php
@@ -32,13 +32,16 @@ class Application_Model_PoolMapper
public function save(Application_Model_Pool $pol)
{
- $data = array('poolID'=> $pol->getPoolID() ,'title'=> $pol->getTitle() ,'description'=> $pol->getDescription() ,'location'=> $pol->getLocation() );
+ $data = array('poolID'=> $pol->getID() ,
+ 'title'=> $pol->getTitle() ,
+ 'description'=> $pol->getDescription() ,
+ 'location'=> $pol->getLocation() );
if (null === ($id = $pol->getID()) ) {
- unset($data['polID']);
+ unset($data['poolID']);
$this->getDbTable()->insert($data);
} else {
- $this->getDbTable()->update($data, array('polID = ?' => $id));
+ $this->getDbTable()->update($data, array('poolID = ?' => $id));
}
}
@@ -47,7 +50,7 @@ class Application_Model_PoolMapper
if (null === ($id = $pol->getID()) ) {
return;
} else {
- $this->getDbTable()->delete(array('polID = ?' => $id));
+ $this->getDbTable()->delete(array('poolID = ?' => $id));
}
}
@@ -60,7 +63,7 @@ class Application_Model_PoolMapper
$row = $result->current();
- $pol->setPoolID($row->poolID)->setTitle($row->title)->setDescription($row->description)->setLocation($row->location);
+ $pol->setID($row->poolID)->setTitle($row->title)->setDescription($row->description)->setLocation($row->location);
}
public function fetchAll()
@@ -70,7 +73,7 @@ class Application_Model_PoolMapper
foreach ($resultSet as $row) {
$entry = new Application_Model_Pool();
- $entry->setPoolID($row->poolID)->setTitle($row->title)->setDescription($row->description)->setLocation($row->location);
+ $entry->setID($row->poolID)->setTitle($row->title)->setDescription($row->description)->setLocation($row->location);
$entries[] = $entry;
}