From 684054f333c76557c8a5da0177c5f905cd3b978d Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 10 Apr 2008 10:43:45 +0000 Subject: [PATCH] Fixed terminal ldap url reload git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10316 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/goto/class_terminalStartup.inc | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc index 3a9a237e5..b8269365f 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc @@ -412,9 +412,6 @@ class termstartup extends plugin } } - /* Check if LDAP server has changed */ - $ldap_changed= ($this->attrs['gotoLdapServer'] != $this->saved_attributes['gotoLdapServer']); - /* Strip out 'default' values */ foreach(array("gotoBootKernel") as $value){ if (!isset($this->attrs[$value]) || $this->attrs[$value] == "default"){ @@ -445,18 +442,23 @@ class termstartup extends plugin } $this->handle_post_events("modify"); - /* Send ldap configuration update - */ - if ($ldap_changed && class_available("DaemonEvent")){ - $events = DaemonEvent::get_event_types(SYSTEM_EVENT | HIDDEN_EVENTS); + /* Check if LDAP server has changed */ + 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'])){ $evt = $events['TRIGGERED']['DaemonEvent_reload_ldap_config']; - $tmp = new $evt['CLASS_NAME']($this->config); - $tmp->set_type(TRIGGERED_EVENT); - $tmp->add_targets(array($this->parent->by_object['termgeneric']->netConfigDNS->macAddress)); - if(!$o_queue->append($tmp)){ - msg_dialog::display(_("Service infrastructure"),msgPool::siError($o_queue->get_error()),ERROR_DIALOG); + $macs = array($this->parent->by_object['termgeneric']->netConfigDNS->macAddress); + + /* Trigger event for all member objects + */ + foreach($macs as $mac){ + $tmp = new $evt['CLASS_NAME']($this->config); + $tmp->set_type(TRIGGERED_EVENT); + $tmp->add_targets(array($mac)); + if(!$o_queue->append($tmp)){ + msg_dialog::display(_("Service infrastructure"),msgPool::siError($o_queue->get_error()),ERROR_DIALOG); + } } } } -- 2.30.2