From dff33ec21cac2635f67573c35499786d80df426f Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 23 Oct 2007 10:07:39 +0000 Subject: [PATCH] Fixed class selection. In some cases, all options were disabled. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7627 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/class_workstationStartup.inc | 47 +++++++++---------- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index aa29a28ad..becae67df 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -867,7 +867,7 @@ class workstartup extends plugin } $ret['auto']['NAME']=_("automatic"); - $ret['auto']['use'] = TRUE; + $ret['auto']['USE'] = TRUE; $secs = array(); /* Walk through all available servers @@ -900,41 +900,36 @@ class workstartup extends plugin { $ret = array(); - if($this->FAIdebianMirror == "inherited") return(array()); + if($this->FAIdebianMirror == "inherited") { + return(array()); + } if(!isset($this->FAIServRepConfig[$this->FAIdebianMirror])){ $this->FAIdebianMirror = "auto"; } $errorClasses = array(); - foreach($this->FAIServRepConfig as $mirror => $rest){ - if(isset($this->FAIServRepConfig[$mirror]['RELEASE'])){ - foreach($this->FAIServRepConfig[$mirror]['RELEASE'] as $release => $sections){ - $use = true; - - if(!count($this->FAIclass) == 0){ - foreach($this->FAIclass as $class){ - if(!in_array($class, $sections['PACKAGES'])){ - $use = false; - $errorClasses[$class] = $class; - }else{ - if(isset($errorClasses[$class])){ - unset($errorClasses[$class]); - } + if(isset($this->FAIServRepConfig[$this->FAIdebianMirror]['RELEASE'])) { + foreach($this->FAIServRepConfig[$this->FAIdebianMirror]['RELEASE'] as $release => $sections){ + $use = true; + + if(!count($this->FAIclass) == 0){ + foreach($this->FAIclass as $class){ + if(!in_array($class, $sections['PACKAGES'])){ + $use = false; + $errorClasses[$class] = $class; + }else{ + if(isset($errorClasses[$class])){ + unset($errorClasses[$class]); } } } - - if($mirror != $this->FAIdebianMirror){ - $use = false; - }else{ - $use = true; - } - $ret[$release]['NAME']=$release; - $ret[$release]['USE']=$use; } - } + $ret[$release]['NAME']=$release; + $ret[$release]['USE']=$use; + } } + if((count($ret) == 0 ) && ($this->FAIdebianMirror != "auto")){ $eClasses = " "; @@ -951,7 +946,7 @@ class workstartup extends plugin foreach($errorClasses as $class){ $eClasses .= $class." "; } - + $this->unresolved_classes = $errorClasses; $this->FAIdebianMirror = "auto"; //$this->FAIclass= array(); -- 2.30.2