diff options
author | Simon | 2011-03-10 13:30:30 +0100 |
---|---|---|
committer | Simon | 2011-03-10 13:30:30 +0100 |
commit | a4402a3b918aa347a770c2509822731fd08a45ee (patch) | |
tree | 4f388eb64710ead6d86a70b8c885ff3bdad7aebf /application/models/ConfigMapper.php | |
parent | default kcl und config hinzugefuegt (diff) | |
download | pbs2-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.php | 13 |
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() |