From 58ebdaf12c7287047efb36102125bc258819e8cd Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 2 Jul 2008 12:57:24 +0000 Subject: [PATCH] Updated FAI management release creation. -Added recreate release db event if a new release was created git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11511 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../fai/admin/fai/class_faiManagement.inc | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc index d26a71773..191c36bc2 100644 --- a/gosa-plugins/fai/admin/fai/class_faiManagement.inc +++ b/gosa-plugins/fai/admin/fai/class_faiManagement.inc @@ -616,6 +616,11 @@ class faiManagement extends plugin msg_dialog::display(_("Permission error"), msgPool::permCreate(_("Branch")), ERROR_DIALOG); }else{ + /* In order to see error messages we have to reset the error handler. + Due to the exit(); + */ + restore_error_handler(); + /* Create it know */ $this->dispNewBranch = false; $this->dispNewFreeze = false; @@ -733,6 +738,25 @@ class faiManagement extends plugin $this->lock_name = $name; $this->lock_dn = $baseToUse; $this->postcreate(); + + + /* Send daemon event to reload the fai release database + */ + if(class_available("DaemonEvent") && class_available("gosaSupportDaemon")){ + $events = DaemonEvent::get_event_types(SYSTEM_EVENT | HIDDEN_EVENT); + if(isset($events['TRIGGERED']['DaemonEvent_recreate_fai_release_db'])){ + $evt = $events['TRIGGERED']['DaemonEvent_recreate_fai_release_db']; + $tmp = new $evt['CLASS_NAME']($this->config); + $tmp->set_type(TRIGGERED_EVENT); + $tmp->add_targets(array("GOsa")); + $o_queue = new gosaSupportDaemon(); + if(!$o_queue->append($tmp)){ + msg_dialog::display(_("Service infrastructure"),msgPool::siError($o_queue->get_error()),ERROR_DIALOG); + } + } + }else{ + trigger_error("Unknown class DaemonEvent / gosaSupportDaemon"); + } exit(); } } -- 2.30.2