summaryrefslogtreecommitdiffstats
path: root/application/models/ConfigMapper.php
diff options
context:
space:
mode:
authorBjörn Geiger2011-03-10 21:48:48 +0100
committerBjörn Geiger2011-03-10 21:48:48 +0100
commitd70f09da9fe5e0eaadde22433761ed696a558fe9 (patch)
tree096476b8074a6cb12da0b05bee1589ab9aa15f8f /application/models/ConfigMapper.php
parentbei Verknüpfungstabellen zusammengesetzter primary key erzeugt, Zend braucht... (diff)
parentMerge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff)
downloadpbs2-d70f09da9fe5e0eaadde22433761ed696a558fe9.tar.gz
pbs2-d70f09da9fe5e0eaadde22433761ed696a558fe9.tar.xz
pbs2-d70f09da9fe5e0eaadde22433761ed696a558fe9.zip
Merge branch 'master' of ssh://git.openslx.org/lsfks/master-teamprojekt/pbs2
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()