From: hickert Date: Wed, 13 Apr 2011 13:59:59 +0000 (+0000) Subject: Fixed loading of items X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=eb94f85241f46666f13668cc5302a8142e84fe19;p=gosa.git Fixed loading of items git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20721 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 20ade7624..b7372be0f 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc @@ -179,7 +179,7 @@ class newConfigManagement extends plugin $rpc = $this->config->getRpcHandle(); $res = $rpc->listConfigItems($data['name']); - if(!$rpc->success() || !$res){ + if(!$rpc->success()){ msg_dialog::display(_("Error"), sprintf(_("Failed to load distributions: %s"), $rpc->get_error()),ERROR_DIALOG); @@ -251,10 +251,6 @@ class newConfigManagement extends plugin }else{ $this->addableContainerItems = array(); } - #print_a($this->installationMethods); - #print_a($this->itemConfig); - #echo $item['type']; - #print_a($this->addableContainerItems); } @@ -529,8 +525,8 @@ class newConfigManagement extends plugin while(preg_match("/\//", $fPath)){ $fPath = preg_replace("/\/[^\/]*$/","", $fPath); $item = $this->dataModel->getItemByPath($fPath); - if(isset($this->cfgItemMap[$item['type']])){ - return(preg_replace("/".preg_quote($item['parentPath'],'/')."/", "", $fullPath)); + if(in_array($item['type'], array('Release', 'Distribution', 'root'))){ + return(preg_replace("/".preg_quote($item['path'],'/')."/", "", $fullPath)); } } return(NULL);