From: hickert Date: Thu, 17 Nov 2005 09:05:52 +0000 (+0000) Subject: FAIclasses for WS are saved in one string X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5d0b0248776f2c96040bc5e179f5c3b6ad5dcee5;p=gosa.git FAIclasses for WS are saved in one string git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1958 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index 6e544c855..fb0970de1 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -155,21 +155,21 @@ class workstartup extends plugin $this->FAIclassInfo = $tmp2; - if(isset($this->attrs['FAIclass'])){ + if((isset($this->FAIclass))&&(!is_array($this->FAIclass))){ $tmp = array(); - $tmp2 = $this->attrs['FAIclass']; - unset($tmp2['count']); - foreach($tmp2 as $class){ - $tmp[$class] = $class; + $tmp = split(" ",$this->FAIclass); + $tmp2 =array(); + + foreach($tmp as $class){ + $tmp2[$class] = $class; } - $this->FAIclass = $tmp; + $this->FAIclass = $tmp2; } if(!is_array($this->FAIclass)){ - $this->FAIclass = array(); + $this->FAIclass =array(); } - $this->orig_dn= $this->dn; } @@ -465,14 +465,18 @@ class workstartup extends plugin $this->gotoKernelParameters.= " o ".$this->customParameters; } - /* Create numeric index for our classes */ - $tmp = array(); + plugin::save(); + + $str = ""; foreach($this->FAIclass as $class){ - $tmp[] = $class; + $str .= $class." "; } - $this->FAIclass = $tmp; + $this->attrs['FAIclass']= ""; + $this->attrs['FAIclass']= trim($str); - plugin::save(); + if(empty($this->attrs['FAIclass'])){ + $this->attrs['FAIclass'] = array(); + } /* Add missing arrays */ foreach (array("gotoFilesystem", "gotoAutoFs", "gotoModules") as $val){ @@ -487,13 +491,6 @@ class workstartup extends plugin unset ($this->attrs['gotoLdapServer']); } - $tmp = array(); - foreach($this->FAIclass as $class){ - $tmp[] = $class; - } - $this->attrs['FAIclass'] = $tmp; - /* Write back to ldap */ - /* if mirror == none stop saving this attribute */ if($this->FAIdebianMirror == "none"){ $this->FAIdebianMirror = "";