summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dcbbb3b)
raw | patch | inline | side by side (parent: dcbbb3b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 19 Apr 2011 10:23:30 +0000 (10:23 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 19 Apr 2011 10:23:30 +0000 (10:23 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20745 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc | patch | blob | history |
diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc
index 21ffe2454ea0fbc0f3b47a1b1d03e98bdb94cbd4..f30ae5d95960a8e1b8d6f1ee17423010d122f7a9 100644 (file)
// Request all config items for the selected release via rpc.
$rpc = $this->config->getRpcHandle();
- $res = $rpc->listConfigItems($data['name']);
+
+ $rPath = $this->getReleasePath($path);
+ $dPath = $this->getDistributionPath($path);
+ $releasePath = preg_replace("/^".preg_quote($dPath, '/')."\/?/", "", $rPath);
+ $res = $rpc->listConfigItems($releasePath);
if(!$rpc->success()){
msg_dialog::display(_("Error"),sprintf(_("Failed to load distributions: %s"),$rpc->get_error()),ERROR_DIALOG);
}else{
}
return(NULL);
}
-
+
+
+ /*! \brief Extracts the distribution path out of a path.
+ * e.g. /root/debian/squeeze/test/module -> /root/debian
+ */
+ function getDistributionPath($fullPath)
+ {
+ $fullPath.='/';
+ while(preg_match("/\//", $fullPath)){
+ $fullPath = preg_replace("/\/[^\/]*$/","", $fullPath);
+ $item = $this->dataModel->getItemByPath($fullPath);
+ if($item['type'] == 'Distribution'){
+ return($fullPath);
+ }
+ }
+ return(NULL);
+ }
+
function saveItemChanges()
{