X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=trunk%2Fgosa-plugins%2Fgoto%2Fadmin%2Fsystems%2Fgoto%2Fclass_workstationService.inc;h=bf30f119f689b264ef3adbffe77ef2da44c879b9;hb=39902196535169338681dd58ff01b9c893295a9b;hp=b5c8e3488a8c06a191593def1f3958031191f15a;hpb=2fbf282c5a8d2668240c618e1e1a24f049316f33;p=gosa.git 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 b5c8e3488..bf30f119f 100644 --- a/trunk/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc +++ b/trunk/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc @@ -49,7 +49,7 @@ class workservice extends plugin var $XKbLayouts =array(); var $XKbVariants =array(); - var $InheritXYSync = FALSE; + var $InheritXYSync = TRUE; function workservice (&$config, $dn= NULL, $parent= NULL) { @@ -182,8 +182,20 @@ class workservice extends plugin } } - if(isset($this->attrs['gotoXHsync']) && isset($this->attrs['gotoXYsync'])) { - $this->InheritXYSync = FALSE; + if(preg_match("/\+/",$this->gotoXHsync)){ + $this->AutoSync = true; + $this->gotoXHsync = preg_replace("/\+/","-",$this->gotoXHsync); + $this->gotoXVsync = preg_replace("/\+/","-",$this->gotoXVsync); + } + + if (isset($this->attrs['gotoXHsync']) && isset($this->attrs['gotoXVsync'])) { + if(!empty($this->attrs['gotoXHsync'][0]) && !empty($this->attrs['gotoXVsync'][0])) { + $this->InheritXYSync = FALSE; + } + } else { + if($this->dn == "new") { + $this->InheritXYSync = FALSE; + } } /* Workaround to fill in inherited values if we've specified an objectclass */ @@ -317,7 +329,7 @@ class workservice extends plugin $smarty->assign("AutoSyncCHK"," "); $smarty->assign("hiddenState",""); } - if($this->InheritXYSync) { + if($this->InheritXYSync && !isset($this->parent->by_object['ogroup'])) { $smarty->assign("InheritXYSync", " checked "); $smarty->assign("hiddenState", " disabled "); $smarty->assign("AutoSynchiddenState", " disabled "); @@ -470,9 +482,7 @@ class workservice extends plugin if($this->InheritXYSync) { $this->attrs['gotoXHsync'] = array(); $this->attrs['gotoXVsync'] = array(); - } - - if($this->AutoSync){ + } elseif ($this->AutoSync) { $this->attrs['gotoXHsync'] = "30+55"; $this->attrs['gotoXVsync'] = "50+70"; }