From: hickert Date: Mon, 2 Jan 2006 13:26:02 +0000 (+0000) Subject: Fixed error X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5af419fc09eab27b87f58015c17e293bbd375c41;p=gosa.git Fixed error git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2392 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index 8fb322f81..f16c3ca68 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -465,27 +465,32 @@ class workstartup extends plugin function getFAIdebianMirrors() { $ret = array(); - - foreach($this->FAIclass as $classes){ - if(isset($this->FAIclassInfo[ $classes]['FAIpackageList']['sec'])){ - if(isset($this->FAIclassInfo[ $classes]['FAIpackageList']['sec']['count'])){ - unset($this->FAIclassInfo[ $classes]['FAIpackageList']['sec']['count']); - } - - foreach($this->FAIclassInfo[ $classes]['FAIpackageList']['sec'] as $sec => $value){ - $secs[$value]= $value; + $secs = array(); + if(is_array($this->FAIclass)){ + foreach($this->FAIclass as $classes){ + if(isset($this->FAIclassInfo[ $classes]['FAIpackageList']['sec'])){ + if(isset($this->FAIclassInfo[ $classes]['FAIpackageList']['sec']['count'])){ + unset($this->FAIclassInfo[ $classes]['FAIpackageList']['sec']['count']); + } + if(is_array($this->FAIclassInfo[ $classes]['FAIpackageList']['sec'])){ + foreach($this->FAIclassInfo[ $classes]['FAIpackageList']['sec'] as $sec => $value){ + $secs[$value]= $value; + } + } } } } - foreach($this->FAIdebianMirrors as $mirr=>$sections){ - $allok = true; - foreach($secs as $sec){ - if(!in_array($sec,$sections)){ - $allok = false; + if(is_array($this->FAIdebianMirrors)){ + foreach($this->FAIdebianMirrors as $mirr=>$sections){ + $allok = true; + foreach($secs as $sec){ + if(!in_array($sec,$sections)){ + $allok = false; + } + } + if($allok){ + $ret[$mirr]=$mirr; } - } - if($allok){ - $ret[$mirr]=$mirr; } } $ret['auto']=_("automatic");