diff --git a/plugins/admin/systems/class_terminalStartup.inc b/plugins/admin/systems/class_terminalStartup.inc
index d5894c839b4ad70c76dade0bf138e2b71928c4e2..f8f27fb61b229883ef5bdf23a57713e7ba306a9a 100644 (file)
<?php
class termstartup extends plugin
{
<?php
class termstartup extends plugin
{
- /* CLI vars */
- var $cli_summary= "Manage terminal startup options";
- var $cli_description= "Some longer text\nfor help";
- var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* Generic terminal attributes */
var $bootmode= "G";
var $goLdapServerList= array();
/* Generic terminal attributes */
var $bootmode= "G";
var $goLdapServerList= array();
/* attribute list for save action */
/* attribute list for save action */
- var $attributes= array("gotoLdapServer", "gotoBootKernel", "gotoKernelParameters");
+ var $attributes= array("gotoLdapServer", "gotoBootKernel", "gotoKernelParameters","gotoModules");
var $objectclasses= array("GOhard");
/* Helper */
var $objectclasses= array("GOhard");
/* Helper */
/* Get arrays */
foreach (array("gotoModules") as $val){
/* 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);
}
sort ($this->$val);
$this->$val= array_unique($this->$val);
}
/* Delete module */
if (isset ($_POST['delete_module'])){
if (count($_POST['modules_list']) && chkacl ($this->acl, "gotoModule") == ""){
/* 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']);
}
}
}
}
$use = " checked ";
};
$use = " checked ";
};
- if(chkacl($this->acl,"gotoLdapServer") == ""){
- $use.= " disabled ";
- }
+ $use .= chkacl($this->acl,"gotoLdapServer");
$SelectBoxLdapServer->AddEntry(
array(
$SelectBoxLdapServer->AddEntry(
array(
if (isset ($this->$val) && count ($this->$val) != 0){
$this->attrs["$val"]= array_unique($this->$val);
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 */
}
/* Strip out 'default' values */
/* Delete value to array, check if unique */
/* Delete value to array, check if unique */
- function del_list (&$array, $list)
+ function del_list ($array, $list)
{
$tmp= array();
foreach ($array as $mod){
{
$tmp= array();
foreach ($array as $mod){
$tmp[]= $mod;
}
}
$tmp[]= $mod;
}
}
- $array= $tmp;
+ return($tmp);
}
/* Generate ListBox frindly output for the defined shares
}
/* Generate ListBox frindly output for the defined shares