summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 08aa2c1)
raw | patch | inline | side by side (parent: 08aa2c1)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 19 Mar 2008 16:27:23 +0000 (16:27 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 19 Mar 2008 16:27:23 +0000 (16:27 +0000) |
-Updated FAI class stuff - Not tested - SI wasn't working
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9948 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9948 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc
index 4d02b5ef0ee4bdb88240e33de491abdbdbe33c79..6e3c553018d2a95818e76e005a6897064b6b5a25 100644 (file)
*/
function update_fai_cache($first_call = FALSE)
{
- $force = FALSE;
+ $force = TRUE;
$start = microtime(TRUE);
}
$o_queue = new gosaSupportDaemon();
- $tmp = $o_queue->FAI_get_server();
+ $tmp = $o_queue->FAI_get_server();
if($o_queue->is_error()){
msg_dialog::display(_("Service infrastructure"),msgPool::siError($o_queue->get_error()),ERROR_DIALOG);
}else{
/* Get the list of available servers and their releases.
*/
- if($force || !isset($this->cache['SERVERS'])){
- $o_queue = new gosaSupportDaemon();
- $tmp = $o_queue->FAI_get_classes($release);
- if($o_queue->is_error()){
- msg_dialog::display(_("Service infrastructure"),msgPool::siError($o_queue->get_error()),ERROR_DIALOG);
- }else{
- foreach($tmp as $entry){
- $this->cache['CLASSES'][$release][$entry['CLASS']] = $this->analyse_fai_object($entry);
- }
+ $o_queue = new gosaSupportDaemon();
+ $tmp = $o_queue->FAI_get_classes($release);
+ if($o_queue->is_error()){
+ msg_dialog::display(_("Service infrastructure"),msgPool::siError($o_queue->get_error()),ERROR_DIALOG);
+ }else{
+ foreach($tmp as $entry){
+ $this->cache['CLASSES'][$release][$entry['CLASS']] = $this->analyse_fai_object($entry);
}
}
$releases= split(",", $entries[2]);
foreach ($releases as $release_data){
- $release= preg_replace('/:.*$/', '', $release_data);
- $sections = split(':', preg_replace('/^[^:]+:([^|]+)|.*$/', '\1', $release_data));
- $classes = split('\|', preg_replace('/^[^|]+\|(.*)$/', '\1', $release_data));
- $this->cache['SERVERS'][$url][$release]=$release;
- $this->cache['SERVERS']['auto'][$release]=$release;
- foreach ($classes as $class){
- if ($class != ""){
- $this->cache['CLASSES'][$release][$class]= array();
+ $release_c = preg_replace('/:.*$/', '', $release_data);
+ $sections_c = split(':', preg_replace('/^[^:]+:([^|]+)|.*$/', '\1', $release_data));
+ $classes_c = split('\|', preg_replace('/^[^|]+\|(.*)$/', '\1', $release_data));
+
+ if($release_c == $release){
+ $this->cache['SERVERS'][$url][$release_c]=$release_c;
+ $this->cache['SERVERS']['auto'][$release_c]=$release_c;
+ foreach ($classes as $class){
+ if ($class != ""){
+ $this->cache['CLASSES'][$release_c][$class]= array();
+ }
}
}
}
}
}
}
- echo sprintf("%f",microtime(TRUE) - $start);
}