summaryrefslogtreecommitdiffstats
path: root/application/models/ConfigMapper.php
diff options
context:
space:
mode:
authorSimon2011-03-10 13:30:30 +0100
committerSimon2011-03-10 13:30:30 +0100
commita4402a3b918aa347a770c2509822731fd08a45ee (patch)
tree4f388eb64710ead6d86a70b8c885ff3bdad7aebf /application/models/ConfigMapper.php
parentdefault kcl und config hinzugefuegt (diff)
downloadpbs2-a4402a3b918aa347a770c2509822731fd08a45ee.tar.gz
pbs2-a4402a3b918aa347a770c2509822731fd08a45ee.tar.xz
pbs2-a4402a3b918aa347a770c2509822731fd08a45ee.zip
Mapper wieder korrigiert && Controller ergänzt
Diffstat (limited to 'application/models/ConfigMapper.php')
-rw-r--r--application/models/ConfigMapper.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/application/models/ConfigMapper.php b/application/models/ConfigMapper.php
index da7a073..d8a23c4 100644
--- a/application/models/ConfigMapper.php
+++ b/application/models/ConfigMapper.php
@@ -66,9 +66,14 @@ class Application_Model_ConfigMapper
}
}
- public function find($id)
+ public function find($id, Application_Model_Config $config = null)
{
- $config = new Application_Model_Config();
+ if($config == null){
+ $return = true;
+ }
+ if($return){
+ $config = new Application_Model_Config();
+ }
$result = $this->getDbTable()->find($id);
if (0 == count($result)) {
return;
@@ -77,7 +82,9 @@ class Application_Model_ConfigMapper
$row = $result->current();
$config->setID($row->configID)->setGroupID($row->groupID)->setMembershipID($row->membershipID)->setCreated($row->created)->setShellscript($row->shellscript)->setTitle($row->title);
- return $config;
+ if($return){
+ return $config;
+ }
}
public function fetchAll()