diff --git a/plugins/admin/systems/class_terminalService.inc b/plugins/admin/systems/class_terminalService.inc
index 27caf1a013c288a7e02c2fe58108c2ab3e064ab3..bd3ee4652e7e298531bdd814ef213d9868a208d3 100644 (file)
var $objectclasses= array("GOhard");
- function termservice ($config, $dn= NULL)
+ function termservice ($config, $dn= NULL, $parent= NULL)
{
- plugin::plugin ($config, $dn);
+ plugin::plugin ($config, $dn, $parent);
array_unshift($this->XDrivers, "["._("unknown")."]");
"1400x1050" => "1400x1050",
"1600x1200" => "1600x1200");
+ if(isset($this->config->data['MAIN']['RESOLUTION_HOOK'])){
+ $file = $this->config->data['MAIN']['RESOLUTION_HOOK'];
+
+ if(is_readable($file)){
+ $str = file_get_contents($file);
+ $lines = split("\n",$str);
+ foreach($lines as $line){
+ $line = trim($line);
+ if(!empty($line)){
+ $this->XResolutions[$line]=$line;
+ }
+ }
+ //natcasesort($this->gotoXResolutions);
+ }else{
+ print_red(sprintf(_("You have specified an external resolution hook which can't be read, please check the permission of the file '%s'."),$file));
+ }
+ }
+
$this->XColordepths= array(
"default" => "["._("inherited")."]",
"8" => "8 " ._("bit"),
$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()