summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fa19f2c)
raw | patch | inline | side by side (parent: fa19f2c)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 24 May 2006 13:58:44 +0000 (13:58 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 24 May 2006 13:58:44 +0000 (13:58 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3513 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_workstationService.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_workstationService.inc b/plugins/admin/systems/class_workstationService.inc
index 340091fdedc5de08054af2fec3aceaf9a404d6a4..d0649fc577e77f5bcb304e2fd0a6add267ea71e4 100644 (file)
plugin::plugin ($config, $dn);
$this->XResolutions= array(
- "default" => "["._("inherited")."]",
"640x480" => "640x480",
"800x600" => "800x600",
"1024x768" => "1024x768",
}
}
-
array_unshift($this->XDrivers, "["._("unknown")."]");
-
+
$this->XColordepths= array(
- "default" => "["._("inherited")."]",
"8" => "8 " ._("bit"),
"15" => "15 "._("bit"),
"16" => "16 "._("bit"),
"24" => "24 "._("bit"));
- $this->XKbModels['default']= "["._("inherited")."]";
foreach(array ("btc9000", "chicony", "compaq", "dell", "dell101", "everex",
"flexpro", "geniuscomfy", "hp", "itouch", "jp106", "logicordless",
"logiinetnav", "logiinternet", "macintosh", "microsoft",
$this->XKbModels[$type] = $type;
}
- $this->MouseTypes= array("AUTO" => "["._("inherited")."]", "ImPS/2" =>"ImPS/2",
- "PS/2" => "PS/2", "Microsoft" =>"Microsoft",
- "Logitech"=>"Microsoft");
+ $this->MouseTypes= array("ImPS/2" => "ImPS/2", "PS/2" => "PS/2", "Microsoft" => "Microsoft",
+ "Logitech" => "Microsoft");
- $this->MousePorts= array("AUTO" => "["._("inherited")."]", "/dev/ttyS0" =>"/dev/ttyS0",
+ $this->MousePorts= array("/dev/ttyS0" =>"/dev/ttyS0",
"/dev/ttyS1" => "/dev/ttyS1", "/dev/psaux" =>"/dev/psaux",
"/dev/input/mice" => "/dev/input/mice");
/* Additional values will be extracted from /etc/gosa/keyboardLayouts */
- $this->XKbLayouts= array ("default"=>"["._("inherited")."]","de"=> "de","intl" =>"intl","us" =>"us");
- $this->XKbVariants= array ("default"=>"["._("inherited")."]", "nodeadkeys"=>"nodeadkeys", "basic"=>"basic");
+ $this->XKbLayouts= array ("de"=> "de","intl" =>"intl","us" =>"us");
+ $this->XKbVariants= array ("nodeadkeys"=>"nodeadkeys", "basic"=>"basic");
/* try to read additional keyboard layouts
*/
}
/* Initialize methods */
- $this->XMethods["default"]= _("default");
$this->XMethods["indirect"]= _("show chooser");
$this->XMethods["query"]= _("direct");
-#$this->XMethods["squery"]= _("direct via ssh");
-#$this->XMethods["nquery"]= _("direct via nx");
+ #$this->XMethods["squery"]= _("direct via ssh");
+ #$this->XMethods["nquery"]= _("direct via nx");
$this->XMethods["load"]= _("load balanced");
-#$this->XMethods["sload"]= _("load balanced via ssh");
-#$this->XMethods["nload"]= _("load balanced via nx");
+ #$this->XMethods["sload"]= _("load balanced via ssh");
+ #$this->XMethods["nload"]= _("load balanced via nx");
$this->XMethods["rdp"]= _("Windows RDP");
$this->XMethods["citrix"]= _("ICA client");
$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", "gotoMouseType", "gotoMousePort");
+ $attrs= $ldap->fetch();
+
+ foreach ($map as $name){
+ if (!isset($attrs[$name][0])){
+ continue;
+ }
+
+ switch ($name){
+ case 'gotoXResolution':
+ $this->XResolutions= array_merge(array('default' => _("inherited").' ['.$attrs[$name][0].']' ), $this->XResolutions);
+ break;
+ case 'gotoXColordepth':
+ $this->XColordepths= array_merge(array('default' => _("inherited").' ['.$attrs[$name][0].' '._('Bit').']'), $this->XColordepths);
+ break;
+ case 'gotoXKbModel':
+ $this->XKbModels= array_merge(array('default' => _("inherited").' ['.$attrs[$name][0].']'), $this->XKbModels);
+ break;
+ case 'gotoXKbLayout':
+ $this->XKbLayouts= array_merge(array('default' => _("inherited").' ['.$attrs[$name][0].']' ), $this->XKbLayouts);
+ break;
+ case 'gotoXKbVariant':
+ $this->XKBvariants= array_merge(array('default' => _("inherited").' ['.$attrs[$name][0].']' ), $this->XKbVariants);
+ break;
+ case 'gotoMouseType':
+ $this->XMouseTypes= array_merge(array('default' => _("inherited").' ['.$attrs[$name][0].']' ), $this->XMouseTypes);
+ break;
+ case 'gotoMousePort':
+ $this->XMousePorts= array_merge(array('default' => _("inherited").' ['.$attrs[$name][0].']' ), $this->XMousePorts);
+ break;
+ }
+
+ }
+
+ }
}
function execute()