diff --git a/plugins/admin/systems/class_terminalService.inc b/plugins/admin/systems/class_terminalService.inc
index 5a8018c615d9f353d0af11263cca083927a99765..7ffe10bce62b4bc5a08b6b1e693473e8f357a3dd 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")."]");
$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()
$this->cleanup();
$ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error(), _("Saving terminal service information failed"));
+ show_ldap_error($ldap->get_error(), sprintf(_("Saving of object system terminal/service with dn '%s' failed."),$this->dn));
$this->handle_post_events("modify");
}
+
+/* Return plugin informations for acl handling */
+ function plInfo()
+ {
+ return (array(
+ "plShortName" => _("Service"),
+ "plDescription" => _("Terminal service"),
+ "plSelfModify" => FALSE,
+ "plDepends" => array(),
+ "plPriority" => 0,
+ "plSection" => array("administration"),
+ "plCategory" => array("terminal"),
+
+ "plProvidedAcls"=> array(
+ "gotoXMonitor" => _("Monitor"),
+ "gotoXMethod" => _("Method"),
+ "gotoXdmcpServer" => _("Remote desktop"),
+ "gotoFontPath" => _("Font path"),
+ "gotoXDriver" => _("Gfx driver"),
+ "gotoXResolution" => _("Gfx resolution"),
+ "gotoXColordepth" => _("Gfx color depth"),
+ "gotoXHsync" => _("Hsync"),
+ "gotoXVsync" => _("Vsync"),
+ "gotoLpdEnable" => _("Printer service enabled"),
+ "gotoLpdServer" => _("Spool server"),
+ "gotoScannerEnable" => _("Scanner enabled"),
+ "gotoScannerModel" => _("Scanner model"),
+ "gotoScannerClients" => _(""),
+ "gotoScannerBackend" => _(""),
+ "gotoXKbModel" => _("Keyboard model"),
+ "gotoXKbLayout" => _("Keyboard layout"),
+ "gotoXKbVariant" => _("Keyboard variant"),
+ "gotoXMouseType" => _("Mouse type"),
+ "gotoXMouseport" => _("Mouse port"),
+ "goFonHardware" => _("Telephone hardware"))
+ ));
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: