Code

Applied patch that alows selecting other releases that supports same classes
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 23 Oct 2007 10:10:11 +0000 (10:10 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 23 Oct 2007 10:10:11 +0000 (10:10 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7628 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_workstationStartup.inc

index 78a3d73f800f8e9c1ff4cb46ba5beda35a9c6bd9..eaa4c8f8d6fd558af5936390e30736736b9a391d 100644 (file)
@@ -923,7 +923,7 @@ class workstartup extends plugin
     }
 
     $ret['auto']['NAME']=_("automatic");
-    $ret['auto']['use'] = TRUE;
+    $ret['auto']['USE'] = TRUE;
     $secs  = array();
 
     /* Walk through all available servers 
@@ -956,40 +956,33 @@ 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;
+    $errorClasses = array();
+    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(!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;
       }
     }