From 417de8e36a25f1e79095b8e9b50a4e41370394d0 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 8 Apr 2011 10:06:11 +0000 Subject: [PATCH] Added remove method git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20666 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../class_ConfigManagementListing.inc | 2 +- .../class_newConfigManagement.inc | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_ConfigManagementListing.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_ConfigManagementListing.inc index 787964448..1b19ef757 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/class_ConfigManagementListing.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/class_ConfigManagementListing.inc @@ -240,7 +240,7 @@ class ConfigManagementListing extends management function removeEntryRequested($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="") { -// $this->parent->removeEntry($target); + $this->parent->removeEntry($target); } function newEntry($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="") diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc index 5f56ac0bb..08ad94433 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc @@ -425,6 +425,20 @@ class newConfigManagement extends plugin { } + 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); + } + } function editEntry($ids) { -- 2.30.2