Code

Added terminal Service inherit
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 29 May 2006 11:06:10 +0000 (11:06 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 29 May 2006 11:06:10 +0000 (11:06 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3544 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_terminalService.inc

index 5a8018c615d9f353d0af11263cca083927a99765..c84058364d15ee3add066d836fa61f17074076e9 100644 (file)
@@ -193,6 +193,47 @@ class termservice extends plugin
 
     $this->hardware_list["automatic"]= _("automatic");
     ksort($this->hardware_list);
+
+
+      /* Load hardware list */
+    $ldap= $this->config->get_ldap_link();
+    $ldap->cd($this->config->current['BASE']);
+    $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".$this->dn."))");
+    if ($ldap->count() == 1){
+      $map= array("gotoXResolution", "gotoXColordepth", "gotoXKbModel", "gotoXKbLayout",
+                  "gotoXKbVariant", "gotoXMouseType", "gotoXMouseport");
+      $attrs= $ldap->fetch();
+
+      foreach ($map as $name){
+        if (!isset($attrs[$name][0])){
+          continue;
+        }
+
+        switch ($name){
+          case 'gotoXResolution':
+            $this->XResolutions['default'] = _("inherited").' ['.$attrs[$name][0].']' ;
+            break;
+          case 'gotoXColordepth':
+            $this->XColordepths['default'] =  _("inherited").' ['.$attrs[$name][0].' '._('Bit').']';
+            break;
+          case 'gotoXKbModel':
+            $this->XKbModels['default'] =  _("inherited").' ['.$attrs[$name][0].']';
+            break;
+          case 'gotoXKbLayout':
+            $this->XKbLayouts['default'] =  _("inherited").' ['.$attrs[$name][0].']';
+            break;
+          case 'gotoXKbVariant':
+            $this->XKbVariants['default'] = _("inherited").' ['.$attrs[$name][0].']' ;
+            break;
+          case 'gotoXMouseType':
+            $this->MouseTypes['AUTO'] = _("inherited").' ['.$attrs[$name][0].']' ;
+            break;
+          case 'gotoXMouseport':
+            $this->MousePorts['AUTO'] = _("inherited").' ['.$attrs[$name][0].']' ;
+            break;
+        }
+      }
+    }
   }
 
   function execute()