summaryrefslogtreecommitdiffstats
path: root/application/controllers/ResourceController.php
diff options
context:
space:
mode:
authorBjörn Geiger2011-06-19 02:58:49 +0200
committerBjörn Geiger2011-06-19 02:58:49 +0200
commitaac3617f3ce0405d9514a1bd6768da4081d50ff1 (patch)
tree0af234e5a1a98bfd0ff0da6e9c23b019704891bb /application/controllers/ResourceController.php
parentBootmenu API Fehler korrigiert (diff)
downloadpbs2-aac3617f3ce0405d9514a1bd6768da4081d50ff1.tar.gz
pbs2-aac3617f3ce0405d9514a1bd6768da4081d50ff1.tar.xz
pbs2-aac3617f3ce0405d9514a1bd6768da4081d50ff1.zip
Bootos API nun mit Configs
Diffstat (limited to 'application/controllers/ResourceController.php')
-rw-r--r--application/controllers/ResourceController.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/application/controllers/ResourceController.php b/application/controllers/ResourceController.php
index ab7ec52..3868433 100644
--- a/application/controllers/ResourceController.php
+++ b/application/controllers/ResourceController.php
@@ -750,6 +750,7 @@ class ResourceController extends Zend_Controller_Action
$bootos = new Application_Model_BootOs();
$bootosMapper = new Application_Model_BootOsMapper();
+ $configsMapper = new Application_Model_ConfigMapper();
$groupID = $this->membership->getGroupID();
$bootos = $bootosMapper->findBy(array('groupid' => $groupID));
@@ -778,6 +779,23 @@ class ResourceController extends Zend_Controller_Action
$xml .= "\t\t\t<distroversion>" . $bootosobj->getDistroversion() . "</distroversion>\n";
$xml .= "\t\t\t<shortname>" . $bootosobj->getShortname() . "</shortname>\n";
$xml .= "\t\t\t<share>" . $bootosobj->getShare() . "</share>\n";
+ $xml .= "\t\t\t<configs>\n";
+ $configs = $configsMapper->findBy(array('bootosID' => $bootosobj->getID()));
+ if(is_array($configs)) {
+ foreach($configs as $config) {
+ if($config->getVisible()) {
+ $xml .= "\t\t\t\t<config>\n";
+ $xml .= "\t\t\t\t<configid>" . $config->getID() . "</configid>\n";
+ $xml .= "\t\t\t\t<title>" . $config->getTitle() . "</title>\n";
+ $xml .= "\t\t\t\<description>" . $config->getDescription() . "</description>\n";
+ $xml .= "\t\t\t\<groupid>" . $config->getGroupID() . "</groupid>\n";
+ $xml .= "\t\t\t\<membershipid>" . $config->getGroupID() . "</membershipid>\n";
+ $xml .= "\t\t\t\<created>" . $config->getGroupID() . "</created>\n";
+ $xml .= "\t\t\t\t</config>\n";
+ }
+ }
+ }
+ $xml .= "\t\t\t</configs>\n";
$xml .= "\t\t</bootos>\n";
}
$xml .= "\t</bootoslist>\n";