From 05149b49145271032dfba7236e34470f24a8f13c Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 23 May 2006 06:12:02 +0000 Subject: [PATCH] Fixed several errors git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3495 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_workstationGeneric.inc | 11 +++++++++-- plugins/admin/systems/class_workstationStartup.inc | 5 +++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc index 976d182cc..dad2c0e87 100644 --- a/plugins/admin/systems/class_workstationGeneric.inc +++ b/plugins/admin/systems/class_workstationGeneric.inc @@ -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){ diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index 5218b8bbb..f33fcae8f 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -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(); } -- 2.30.2