From: hickert Date: Mon, 11 Apr 2011 13:21:56 +0000 (+0000) Subject: Updated new config management X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5c565cbee25b051ceaf11578aef1e806961afe3f;p=gosa.git Updated new config management git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20686 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 5812db35e..0668124b2 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc @@ -417,35 +417,38 @@ class newConfigManagement extends plugin - /*! \brief - * @param - * @return + /*! \brief Removes an entry from the listing. */ - function remove_lock() - { - } - function removeEntry($ids) { + $item = $this->dataModel->getItemById($ids[0]); - $release = preg_replace("/^.*\//","",$item['values']['__release']); - $path = $item['values']['__path']; - $rpc = $this->config->getRpcHandle(); - $rpc->removeConfigItem($release, $path); - if(!$rpc->success()){ - msg_dialog::display(_("Error"), sprintf(_("Failed to remove: %s"), $rpc->get_error()),ERROR_DIALOG); - return(NULL); + + // Is an config item. + if(isset($this->cfgItemMap[$item['type']])){ + $release = preg_replace("/^.*\//","",$item['values']['__release']); + $path = $item['values']['__path']; + $rpc = $this->config->getRpcHandle(); + $rpc->removeConfigItem($release, $path); + if(!$rpc->success()){ + msg_dialog::display(_("Error"), sprintf(_("Failed to remove: %s"), $rpc->get_error()),ERROR_DIALOG); + return(NULL); + }else{ + $this->dataModel->removeItem($item['path']); + } }else{ - $this->dataModel->removeItem($item['path']); + echo $item['type']." - are not handled yet!"; } } + + /*! \brief Edits a selected list item. + */ function editEntry($ids) { // Update the template engine to use another type of item and // some other values. $item = $this->dataModel->getItemById($ids[0]); - if(isset($this->cfgItemMap[$item['type']])){ $release = preg_replace("/^.*\//","",$item['values']['__release']); $path = $item['values']['__path']; @@ -582,6 +585,7 @@ class newConfigManagement extends plugin } } } + function remove_lock() {} }