From ae1abcc998f6e95dce4bf484031f2b6cc529a353 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 28 Mar 2008 07:22:53 +0000 Subject: [PATCH] Fixed Workstation Startup -Daemon Event Ldap reload was sent everytime. Now it is only send when the ldap attribute has changed. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10052 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/goto/class_workstationStartup.inc | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc index 1f7fbf73d..24bb9adb1 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc @@ -102,7 +102,7 @@ class workstartup extends plugin foreach($this->attrs['gotoLdapServer'] as $value){ $this->gotoLdapServers[] = preg_replace("/^[0-9]*:/","",$value); } - } + } if(!count($this->gotoLdapServers) && $this->member_of_ogroup){ $this->gotoLdap_inherit = TRUE; } @@ -870,18 +870,6 @@ class workstartup extends plugin } } - /* Check if LDAP server has changed */ - $ldap_changed= false; - if (isset($this->saved_attributes['gotoLdapServer'])){ - if (isset($this->attrs['gotoLdapServer']) && $this->attrs['gotoLdapServer'] != $this->saved_attributes['gotoLdapServer']){ - $ldap_changed= true; - } - } else { - if (isset($this->attrs['gotoLdapServer'])){ - $ldap_changed= true; - } - } - if (($this->attrs['gotoBootKernel'] == "default-inherited") || ($this->attrs['gotoBootKernel'] == "%default%")){ $this->attrs['gotoBootKernel']= array(); } @@ -917,7 +905,6 @@ class workstartup extends plugin $tmp[] = $settings['server']."|".$name."|".$settings['mountPoint']; } $this->attrs['gotoShare']=$tmp; - $this->cleanup(); $ldap->modify ($this->attrs); new log("modify","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); @@ -928,7 +915,7 @@ class workstartup extends plugin $this->handle_post_events("modify"); /* Check if LDAP server has changed */ - if ($ldap_changed && class_available("DaemonEvent")){ + if (isset($this->attrs['gotoLdapServer']) && class_available("DaemonEvent")){ $events = DaemonEvent::get_event_types(SYSTEM_EVENT | HIDDEN_EVENT); $o_queue = new gosaSupportDaemon(); if(isset($events['TRIGGERED']['DaemonEvent_reload_ldap_config'])){ -- 2.30.2