Code

Updated system Management
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 17 Dec 2008 14:45:09 +0000 (14:45 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 17 Dec 2008 14:45:09 +0000 (14:45 +0000)
-Opsi activation

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13308 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index be351017d7d6e007c3a90cd4f604882225b39c41..a10d254e9196bb6c41bc655e320285ec468ac54c 100644 (file)
@@ -989,8 +989,15 @@ class systems extends plugin
         $this->systab->save();
 
         /* Post handling for activated systems 
+            target opsi -> Remove source.
+            target gosa -> Activate system.
          */
-        if(isset($this->systab->was_activated) && $this->systab->was_activated){
+        if($this->systab instanceOf opsi_tabs && $this->systab->was_activated){
+          $ldap = $this->config->get_ldap_link();
+          $ldap->cd($this->config->current['BASE']);
+          $ldap->rmdir ($this->systab->dn);
+          @DEBUG(DEBUG_LDAP,__LINE__, __FUNCTION__, __FILE__,"Source removed: ".$this->systab->dn,"Opsi host activated.");
+        }elseif(isset($this->systab->was_activated) && $this->systab->was_activated){
           $this->activate_new_device($this->systab->dn);
         }