Code

Updated services, remove krb keys too if server is removed
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 5 Jun 2008 09:27:24 +0000 (09:27 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 5 Jun 2008 09:27:24 +0000 (09:27 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11239 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/systems/admin/systems/class_serverService.inc

index 7416989e7d6b366dece99b29826b94c89dd6b479..e65943a41264527db0141250b71b44f251576e77 100644 (file)
@@ -260,7 +260,7 @@ class ServerService extends plugin
     if(is_object($this->dialog)){
 #      $this->dialog->save_object();
       $add ="";
-      if(isset($this->dialog->krb_host_key)){
+      if(isset($this->dialog->krb_host_key) && $this->dialog->krb_host_key instanceof krb_host_keys){
         $add = $this->dialog->krb_host_key->save_object();
         $add = $this->dialog->krb_host_key->execute();
       }
@@ -428,6 +428,9 @@ class ServerService extends plugin
         }
       }
       if($this->plugins[$name]->initially_was_account){
+        if(isset($this->plugins[$name]->krb_host_key) && $this->plugins[$name]->krb_host_key instanceof krb_host_keys){
+          $this->plugins[$name]->krb_host_key->remove_from_parent();
+        }
         $this->plugins[$name]->remove_from_parent();
       }
     }