summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 37c7614)
raw | patch | inline | side by side (parent: 37c7614)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 15 Apr 2008 09:16:05 +0000 (09:16 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 15 Apr 2008 09:16:05 +0000 (09:16 +0000) |
-Reload FAI release database if a the classes have changed
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10449 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10449 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/fai/admin/fai/class_FAI.inc | patch | blob | history |
index eb01e71de430a2b9738e9d3581bd3b560013e782..14bf01cd06f7905f8d2f166cf51864cf5bd3daa6 100644 (file)
/* check which objects must be saved, and save them */
static function save_release_changes_now()
{
+ global $config;
/* Variable init*/
$to_save = array();
$objectAttrs= $save['objectAttrs'];
/* Get ldap object */
- global $config;
$ldap = $config->get_ldap_link();
$ldap->cd($config->current['BASE']);
}
}
}
- }
+ }
+
+ /* Reload GOsa si FAI DB/cache
+ */
+ if(count($to_save)){
+ 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']($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);
+ }
+ }
+ }
+ }
+
session::set('FAI_objects_to_save',array());
}