Code

some more w3c fixes
[gosa.git] / plugins / admin / ogroups / class_termgroup.inc
index 667e820b9421b083fa592bed3e4da1d5fc0d0213..ff2c6666a0a05d516b6a0f74ade931a0fb6a98ae 100644 (file)
@@ -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,8 +36,15 @@ class termgroup extends plugin
     $this->config= $config;
   }
 
+  function check()
+  {
+  }
+
   function execute()
   {
+       /* Call parent execute */
+       plugin::execute();
+
 
     /* Watch for events */
     if (isset($_POST['action'])){
@@ -46,7 +57,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 +69,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 +81,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 {