From 7044cbfd5038c16f327d7acab58ba1d556fa2424 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 15 Jan 2008 14:23:10 +0000 Subject: [PATCH] Added error message, if FAI class is not available. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8367 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/class_workstationStartup.inc | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/gosa-core/plugins/admin/systems/class_workstationStartup.inc b/gosa-core/plugins/admin/systems/class_workstationStartup.inc index 90ba14cc4..c74b37617 100644 --- a/gosa-core/plugins/admin/systems/class_workstationStartup.inc +++ b/gosa-core/plugins/admin/systems/class_workstationStartup.inc @@ -1097,20 +1097,23 @@ class workstartup extends plugin $base = array_search($release,$this->cache['RELEASE_DNS']); $this->cache['CLASSES'][$release] = array(); - if(!empty($base)){ - $filter = "(|(objectClass=FAIpackageList)(objectClass=FAItemplate)(objectClass=FAIvariable)". - "(objectClass=FAIscript)(objectClass=FAIhook)(objectClass=FAIprofile)". - "(objectClass=FAIpartitionTable))"; - $list = FAI::get_all_objects_for_given_base($base,$filter,TRUE); - foreach($list as $attrs){ - $info = $this->analyse_fai_object($attrs); - if(count($info)){ - $this->cache['CLASSES'][$release][$attrs['cn'][0]][] = $info; + if(class_exists("FAI")){ + if(!empty($base)){ + $filter = "(|(objectClass=FAIpackageList)(objectClass=FAItemplate)(objectClass=FAIvariable)". + "(objectClass=FAIscript)(objectClass=FAIhook)(objectClass=FAIprofile)". + "(objectClass=FAIpartitionTable))"; + $list = FAI::get_all_objects_for_given_base($base,$filter,TRUE); + foreach($list as $attrs){ + $info = $this->analyse_fai_object($attrs); + if(count($info)){ + $this->cache['CLASSES'][$release][$attrs['cn'][0]][] = $info; + } } } + }else{ + print_red(_("Could not load available classes, the fai extension plugin seems not to be installed.")); } - /* Add object caught from external hook */ $lines= $this->GetHookElements(); -- 2.30.2