From: hickert Date: Tue, 19 Apr 2011 10:25:48 +0000 (+0000) Subject: Updated release part detection X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c07e1f0ebdc3adfcb6aaa83434bd660340a53bca;p=gosa.git Updated release part detection git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20746 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc index f30ae5d95..2b9234627 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc @@ -226,10 +226,7 @@ class newConfigManagement extends plugin // Request all config items for the selected release via rpc. $rpc = $this->config->getRpcHandle(); - - $rPath = $this->getReleasePath($path); - $dPath = $this->getDistributionPath($path); - $releasePath = preg_replace("/^".preg_quote($dPath, '/')."\/?/", "", $rPath); + $releasePath = $this->getReleasePart($path); $res = $rpc->listConfigItems($releasePath); if(!$rpc->success()){ msg_dialog::display(_("Error"),sprintf(_("Failed to load distributions: %s"),$rpc->get_error()),ERROR_DIALOG); @@ -596,6 +593,17 @@ class newConfigManagement extends plugin } return(NULL); } + + + /*! \brief Extracts the release-part out of a path. + * e.g. /root/debian/squeeze/test/module -> squeeze/test + */ + function getReleasePart($path) + { + $rPath = $this->getReleasePath($path); + $dPath = $this->getDistributionPath($path); + return(preg_replace("/^".preg_quote($dPath, '/')."\/?/", "", $rPath)); + } function saveItemChanges()