From: psc Date: Wed, 5 May 2010 10:50:27 +0000 (+0000) Subject: Followup commit for #4146 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ff20860b73c14cc5e79a774cfc48dc2db9ff625c;p=gosa.git Followup commit for #4146 Fix problem that in some cases wrong error messages are printed. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@18146 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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..f42eb7dbd 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,16 @@ 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; + } } /* Workaround to fill in inherited values if we've specified an objectclass */ @@ -470,9 +478,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"; }