From: hickert Date: Wed, 1 Mar 2006 07:14:33 +0000 (+0000) Subject: Some FAI funtionality X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9c1b1c04a9470422df68e63844043e3e3be84848;p=gosa.git Some FAI funtionality git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2788 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index 6f9d7a22f..11f02446b 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -143,6 +143,7 @@ class workstartup extends plugin */ while($attr = $ldap->fetch()){ $cn = $attr['cn'][0]; + $tmp2[$cn]['REST'] = $attr; if(in_array('FAIpackageList',$attr['objectClass'])){ $tmp2[$cn]['FAIpackageList']['obj'] = 'FAIpackageList'; $tmp2[$cn]['FAIpackageList']['kzl'] = 'Pl'; @@ -211,13 +212,26 @@ class workstartup extends plugin /* Create array to display available classes/profiles in a selectbox */ function selectFriendlyClasses(){ $tmp=array(); + + $tmp2 = $this->getFAIreleases(); + if(!in_array($this->FAIrelease, $tmp2)){ + $this->FAIrelease = key($tmp2); + } + + foreach($this->FAIclasses as $class){ + + if(($this->FAIdebianMirror != "auto") && (!preg_match("/ou=".$this->FAIrelease."/",$this->FAIclassInfo[$class]['REST']['dn']))){ + continue; + } $str = ""; $skip = false; if(isset($this->FAIclassInfo[$class])){ foreach($this->FAIclassInfo[$class] as $objs){ - $str .= $objs['kzl']." "; + if (isset($objs['kzl'])){ + $str .= $objs['kzl']." "; + } } } $tmp[$class] = $class."  [".$str."]"; @@ -276,8 +290,10 @@ class workstartup extends plugin foreach($this->FAIclass as $name){ if(isset($this->FAIclassInfo[$name])){ foreach($this->FAIclassInfo[$name] as $atr){ - if($atr['obj'] == "FAIpartitionTable"){ - $found ++ ; + if(isset($atr['obj'])){ + if($atr['obj'] == "FAIpartitionTable"){ + $found ++ ; + } } } } @@ -497,6 +513,7 @@ class workstartup extends plugin } } } + if(is_array($this->FAIdebianMirrors)){ foreach($this->FAIdebianMirrors as $mirr=>$sections){ $allok = true; @@ -505,6 +522,11 @@ class workstartup extends plugin $allok = false; } } + if(count($this->FAIclass)){ + if(!in_array($this->FAIrelease,$this->FAIreleases[$mirr])){ + $allok = false; + } + } if($allok){ $ret[$mirr]=$mirr; }