Code

Fixed several errors
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 23 May 2006 06:12:02 +0000 (06:12 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 23 May 2006 06:12:02 +0000 (06:12 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3495 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_workstationGeneric.inc
plugins/admin/systems/class_workstationStartup.inc

index 976d182ccf1d302242d0b562b152433d50aee5ae..dad2c0e87ed5163b094699ccf47491b321665b99 100644 (file)
@@ -353,7 +353,13 @@ class workgeneric extends plugin
 
     /* Update ntp server settings */
     if($this->inheritTimeServer){
-      $this->attrs['gotoNtpServer'] = array();
+      if($this->new){
+        if(isset($this->attrs['gotoNtpServer'])){
+          unset($this->attrs['gotoNtpServer']);
+        }
+      }else{
+        $this->attrs['gotoNtpServer'] = array();
+      }
     }else{
       /* Set ntpServers */
       $this->attrs['gotoNtpServer'] = array();
@@ -369,6 +375,7 @@ class workgeneric extends plugin
       $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
       $ldap->cd($this->dn);
       $ldap->add($this->attrs);
+      show_ldap_error($ldap->get_error(), _("Saving workstation failed"));
       if(!$this->didAction){
         $this->handle_post_events("add");
       }
@@ -378,7 +385,7 @@ class workgeneric extends plugin
       }
       $ldap->cd($this->dn);
       $this->cleanup();
-      $this->attrs['gosaUnitTag']= array();
+//      $this->attrs['gosaUnitTag']= array();
       $ldap->modify ($this->attrs); 
 
       if(!$this->didAction){
index 5218b8bbb4d761df91bc1f76e6c47664f481c038..f33fcae8f012307850614a0158dbb820a67efdbd 100644 (file)
@@ -9,9 +9,9 @@ class workstartup extends plugin
   /* Generic terminal attributes */
   var $bootmode             = "G";
   var $goLdapServerList     = array();
-  var $gotoBootKernel       = "";
+  var $gotoBootKernel       = "default";
   var $gotoKernelParameters = "";
-  var $gotoLdapServer       = "";
+  var $gotoLdapServer       = "default";
   var $gotoModules          = array();
   var $gotoAutoFs           = array();
   var $gotoFilesystem       = array();
@@ -890,6 +890,7 @@ class workstartup extends plugin
     if ($this->attrs['gotoLdapServer'] == "default"){
       $this->attrs['gotoLdapServer']= array();
     }
+
     if ($this->attrs['gotoBootKernel'] == "%default%" || $this->attrs['gotoBootKernel'] == "default"){
       $this->attrs['gotoBootKernel']= array();
     }