Code

Enable inheritance of XDriver
authorpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 28 Sep 2009 09:35:23 +0000 (09:35 +0000)
committerpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 28 Sep 2009 09:35:23 +0000 (09:35 +0000)
(Trac: #3020)

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@14365 594d385d-05f5-0310-b6e9-bd551577e9d8

trunk/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc
trunk/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc

index 7246e559782671d88870fd27aa25bafab71a8fb7..7365979658f1e38808d685c038cc58c9beb2f179 100644 (file)
@@ -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"; 
index 93591bea411fd1262eba0feda01f1c14255262a6..977da93fd5ae0179b43cc43f38030448f28caa55 100644 (file)
@@ -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"){