From: hickert Date: Thu, 10 Apr 2008 10:43:45 +0000 (+0000) Subject: Fixed terminal ldap url reload X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=684054f333c76557c8a5da0177c5f905cd3b978d;p=gosa.git Fixed terminal ldap url reload git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10316 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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); + } } } }