X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fsystems%2Fclass_terminalStartup.inc;h=f8f27fb61b229883ef5bdf23a57713e7ba306a9a;hb=14a1125842be8515bd8b8f7117081e00f40470b5;hp=d5894c839b4ad70c76dade0bf138e2b71928c4e2;hpb=2b8c085aacdfbc8af1fceab6629042a24f4af7a8;p=gosa.git diff --git a/plugins/admin/systems/class_terminalStartup.inc b/plugins/admin/systems/class_terminalStartup.inc index d5894c839..f8f27fb61 100644 --- a/plugins/admin/systems/class_terminalStartup.inc +++ b/plugins/admin/systems/class_terminalStartup.inc @@ -1,11 +1,6 @@ "Eins ist toll", "zwei" => "Zwei ist noch besser"); - /* Generic terminal attributes */ var $bootmode= "G"; var $goLdapServerList= array(); @@ -24,7 +19,7 @@ class termstartup extends plugin /* attribute list for save action */ - var $attributes= array("gotoLdapServer", "gotoBootKernel", "gotoKernelParameters"); + var $attributes= array("gotoLdapServer", "gotoBootKernel", "gotoKernelParameters","gotoModules"); var $objectclasses= array("GOhard"); /* Helper */ @@ -38,13 +33,15 @@ class termstartup extends plugin /* Get arrays */ foreach (array("gotoModules") as $val){ - if (isset($this->attrs["$val"]["count"])){ - for ($i= 0; $i<$this->attrs["count"]; $i++){ - if (isset($this->attrs["$val"][$i])){ - array_push($this->$val, $this->attrs["$val"][$i]); + $tmp =array(); + if (isset($this->attrs[$val]["count"])){ + for ($i= 0; $i<$this->attrs[$val]["count"]; $i++){ + if (isset($this->attrs[$val][$i])){ + $tmp[] = $this->attrs["$val"][$i]; } } } + $this->$val = $tmp; sort ($this->$val); $this->$val= array_unique($this->$val); } @@ -182,7 +179,7 @@ class termstartup extends plugin /* Delete module */ if (isset ($_POST['delete_module'])){ if (count($_POST['modules_list']) && chkacl ($this->acl, "gotoModule") == ""){ - $this->del_list ($this->gotoModules, $_POST['modules_list']); + $this->gotoModules = $this->del_list($this->gotoModules, $_POST['modules_list']); } } @@ -248,9 +245,7 @@ class termstartup extends plugin $use = " checked "; }; - if(chkacl($this->acl,"gotoLdapServer") == ""){ - $use.= " disabled "; - } + $use .= chkacl($this->acl,"gotoLdapServer"); $SelectBoxLdapServer->AddEntry( array( @@ -381,8 +376,9 @@ class termstartup extends plugin if (isset ($this->$val) && count ($this->$val) != 0){ $this->attrs["$val"]= array_unique($this->$val); + }else{ + $this->attrs["$val"]=array(); } - if(!isset($this->attrs["$val"])) $this->attrs["$val"]=array(); } /* Strip out 'default' values */ @@ -423,7 +419,7 @@ class termstartup extends plugin /* Delete value to array, check if unique */ - function del_list (&$array, $list) + function del_list ($array, $list) { $tmp= array(); foreach ($array as $mod){ @@ -431,7 +427,7 @@ class termstartup extends plugin $tmp[]= $mod; } } - $array= $tmp; + return($tmp); } /* Generate ListBox frindly output for the defined shares