From 4404c6449ba2a19729f44f8384910852afecb3b7 Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 28 Jul 2006 11:18:57 +0000 Subject: [PATCH] Override for inherited new objects git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4339 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_systemManagement.inc | 13 ++++++++++++- plugins/admin/systems/class_workstationService.inc | 11 +++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc index d68133582..5cff78e0a 100644 --- a/plugins/admin/systems/class_systemManagement.inc +++ b/plugins/admin/systems/class_systemManagement.inc @@ -395,8 +395,19 @@ class systems extends plugin if (count($message) == 0){ /* Save terminal data to ldap */ - gosa_log ("System object'".$this->dn."' has been saved"); + if(isset($_SESSION['SelectedSystemType']['ogroup'])){ + foreach (array("workservice", "termservice") as $cls){ + if (isset($this->systab->by_object[$cls])){ + $this->systab->by_object[$cls]->gotoXMouseport= ""; + $this->systab->by_object[$cls]->gotoXMouseType= ""; + $this->systab->by_object[$cls]->gotoXResolution= ""; + $this->systab->by_object[$cls]->gotoXColordepth= ""; + } + } + } + $this->systab->save(); + gosa_log ("System object'".$this->dn."' has been saved"); /* Incoming behavior; you can select a system type and an ogroup membership. * If this object is an Incoming object, $_SESSION['SelectedSystemType'] isset. diff --git a/plugins/admin/systems/class_workstationService.inc b/plugins/admin/systems/class_workstationService.inc index e7ec6c77d..7ba6be5e1 100644 --- a/plugins/admin/systems/class_workstationService.inc +++ b/plugins/admin/systems/class_workstationService.inc @@ -223,6 +223,17 @@ class workservice extends plugin } } + + /* Workaround to fill in inherited values if we've specified an objectclass */ + if (isset($_SESSION['SelectedSystemType']['ogroup']) && $_SESSION['SelectedSystemType']['ogroup'] != 'none'){ + $this->XResolutions= array('default' => _("inherited")); + $this->XColordepths= array('default' => _("inherited")); + $this->XKbModels= array('default' => _("inherited")); + $this->XKbLayouts= array('default' => _("inherited")); + $this->XKbVariants= array('default' => _("inherited")); + $this->MouseTypes= array('AUTO' => _("inherited")); + $this->MousePorts= array('AUTO' => _("inherited")); + } } function execute() -- 2.30.2