Code

Updated config mangement, enabled remove of templates
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 18 May 2011 12:39:16 +0000 (12:39 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 18 May 2011 12:39:16 +0000 (12:39 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20860 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc

index 31f3df8f0416cb491b09a53c589767b0f8760985..eca4fbeb844cc86bd5d1b6ea777a25f175799d69 100644 (file)
@@ -535,6 +535,18 @@ class newConfigManagement extends plugin
                         $this->dataModel->removeItem($item['path']);
                     }
 
+                }elseif($item['type'] == 'Template'){
+
+                    // Remove Template
+                    $rpc = $this->config->getRpcHandle();
+                    $rpc->installRemoveTemplate($item['name']);
+                    if(!$rpc->success()){
+                        msg_dialog::display(_("Error"), sprintf(_("Failed to remove the template: %s. Error was: %s"), 
+                                    $release, $rpc->get_error()),ERROR_DIALOG);
+                        return(NULL);
+                    }else{
+                        $this->dataModel->removeItem($item['path']);
+                    }
                 }else{
                     trigger_error($item['type']." - are not handled yet!");
                 }