From: psc Date: Mon, 28 Sep 2009 09:35:23 +0000 (+0000) Subject: Enable inheritance of XDriver X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b938442f679b90b7a8a5c1efbeb79818847f7794;p=gosa.git Enable inheritance of XDriver (Trac: #3020) git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@14365 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/trunk/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc b/trunk/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc index 7246e5597..736597965 100644 --- a/trunk/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc +++ b/trunk/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc @@ -724,7 +724,7 @@ class workgeneric extends plugin /* Set workstation service attributes to inherited */ if($this->member_of_ogroup && isset($this->parent->by_object['workservice'])){ - foreach(array("gotoXKbLayout","gotoXKbModel","gotoXKbVariant", + foreach(array("gotoXKbLayout","gotoXKbModel","gotoXKbVariant","gotoXDriver", "gotoXResolution","gotoXColordepth","gotoXMouseType","gotoXMouseport") as $name){ if($this->parent->by_object['workservice']->acl_is_writeable($name)){ $this->parent->by_object['workservice']->$name = "default"; diff --git a/trunk/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc b/trunk/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc index 93591bea4..977da93fd 100644 --- a/trunk/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc +++ b/trunk/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc @@ -184,7 +184,7 @@ class workservice extends plugin $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".LDAP::prepare4filter($this->dn)."))"); if ($ldap->count() == 1){ $map= array("gotoXResolution", "gotoXColordepth", "gotoXKbModel", "gotoXKbLayout", - "gotoXKbVariant", "gotoXMouseType", "gotoXMouseport"); + "gotoXKbVariant", "gotoXMouseType", "gotoXMouseport", "gotoXDriver"); $attrs= $ldap->fetch(); foreach ($map as $name){ @@ -193,6 +193,9 @@ class workservice extends plugin } switch ($name){ + case 'gotoXDriver': + $this->XDrivers = array('default' => _("inherited").' ['.$attrs[$name][0].']' ) + $this->XDrivers; + break; case 'gotoXResolution': $this->XResolutions= array('default' => _("inherited").' ['.$attrs[$name][0].']' ) + $this->XResolutions; break; @@ -223,6 +226,7 @@ class workservice extends plugin /* Workaround to fill in inherited values if we've specified an objectclass */ $SelectedSystemType = session::get("SelectedSystemType"); if (isset($SelectedSystemType['ogroup']) && $SelectedSystemType['ogroup'] != 'none'){ + $this->XDrivers=array('default' => _("inherited")); $this->XResolutions= array('default' => _("inherited")); $this->XColordepths= array('default' => _("inherited")); $this->XKbModels= array('default' => _("inherited")); @@ -428,7 +432,7 @@ class workservice extends plugin /* Strip out 'default' values */ foreach(array( "gotoXDriver", "gotoXResolution", "gotoXColordepth", - "gotoXKbModel", "gotoXKbLayout", + "gotoXKbModel", "gotoXKbLayout", "gotoXDriver", "gotoXKbVariant", "gotoXMouseType", "gotoXMouseport") as $val){ if ($this->attrs[$val] == "default"){