X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fogroups%2Fclass_termgroup.inc;h=fe7b1611f3ce549b39fe487976b2dbfaf681ff1b;hb=deee339342e43d33018cc458a5380ed67209b796;hp=e493341eac788d83999208ccc150951d96b2fa1a;hpb=e299f0ca47a924516f2afbe4e922f2418b75315c;p=gosa.git diff --git a/plugins/admin/ogroups/class_termgroup.inc b/plugins/admin/ogroups/class_termgroup.inc index e493341ea..fe7b1611f 100644 --- a/plugins/admin/ogroups/class_termgroup.inc +++ b/plugins/admin/ogroups/class_termgroup.inc @@ -23,7 +23,11 @@ class termgroup extends plugin $attrs = $ldap->fetch(); if (in_array("gotoTerminal", $attrs['objectClass']) || in_array("gotoWorkstation", $attrs['objectClass'])){ - $this->members[$attrs['cn'][0]]= $attrs['macAddress'][0]; + if (isset($attrs['macAddress'])){ + $this->members[$attrs['cn'][0]]= $attrs['macAddress'][0]; + } else { + $this->members[$attrs['cn'][0]]= ""; + } } } } @@ -32,6 +36,10 @@ class termgroup extends plugin $this->config= $config; } + function check() + { + } + function execute() { @@ -46,7 +54,7 @@ class termgroup extends plugin switch($_POST['saction']){ case 'wake': - $cmd= $this->search($this->config->data['TABS'], "terminfo", "WAKECMD"); + $cmd= search_config($this->config->data['TABS'], "terminfo", "WAKECMD"); if ($cmd == ""){ print_red(_("No WAKECMD definition found in your gosa.conf")); } else { @@ -58,7 +66,7 @@ class termgroup extends plugin break; case 'reboot': - $cmd= $this->search($this->config->data['TABS'], "terminfo", "REBOOTCMD"); + $cmd= search_config($this->config->data['TABS'], "terminfo", "REBOOTCMD"); if ($cmd == ""){ print_red(_("No REBOOTCMD definition found in your gosa.conf")); } else { @@ -70,7 +78,7 @@ class termgroup extends plugin break; case 'halt': - $cmd= $this->search($this->config->data['TABS'], "terminfo", "HALTCMD"); + $cmd= search_config($this->config->data['TABS'], "terminfo", "HALTCMD"); if ($cmd == ""){ print_red(_("No HALTCMD definition found in your gosa.conf")); } else { @@ -89,6 +97,7 @@ class termgroup extends plugin $smarty= get_smarty(); $smarty->assign("actions", array("wake" => _("Wake up"), "halt" => _("Switch off"), "reboot" => _("Reboot"))); + $smarty->assign("actionACL", chkacl($this->acl, 'action')); /* Show main page */ return ($smarty->fetch (get_template_path('termgroup.tpl', TRUE)));