diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc
index 9517edfd49dc25ce8d50c7b4989909240c9e790c..c5ca3cced69af4ac1b745a1d9c8278a580342e18 100644 (file)
/* Search all FAI objects */
$ldap->search("(| (objectClass=FAIpackageList)(objectClass=FAItemplate)
- (objectClass=FAIvariable)(objectClass=FAIscript')(objectClass=FAIhook)(objectClass=FAIprofile)
+ (objectClass=FAIvariable)(objectClass=FAIscript)(objectClass=FAIhook)(objectClass=FAIprofile)
(objectClass=FAIpartitionTable))",array("objectClass","cn"),true);
/* Sort all entries, and attach elementtype.
* To be able to show the types in the listbox.
$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;
}
{
/* Call parent execute */
plugin::execute();
+
/* Do we need to flip is_account state? */
if (isset($_POST['modify_state'])){
$this->is_account= !$this->is_account;
}
}
- if((isset($this->FAIclassInfo[$_POST['FAIclassesSel']]['FAIpackageList']))&&($found>0)){
- print_red(_("There is already a profile in your selection that contain partition table configuratons."));
+ if((isset($this->FAIclassInfo[$_POST['FAIclassesSel']]['FAIpartitionTable']))&&($found>0)){
+ print_red(_("There is already a profile in your selection that contain partition table configurations."));
}else{
$this->FAIclass[$_POST['FAIclassesSel']]=$_POST['FAIclassesSel'];
}
$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){
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 = "";