Code

Fixed some undefined index warnings if no FAI classes are available in workstation...
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 20 Jun 2008 08:22:51 +0000 (08:22 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 20 Jun 2008 08:22:51 +0000 (08:22 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11388 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc

index 4d2ea8c6fec2de8ff56fc680bd6941bccc558c93..b89cff3758e6b04c304db4166fb8ba2e7e81361c 100644 (file)
@@ -1211,7 +1211,9 @@ class workstartup extends plugin
 
     /* Get list of available kernel for this release 
      */
-    if($force || !isset($this->cache['KERNELS'][$release]) && $release != ""){
+    if(!isset($this->cache['KERNELS'])) $this->cache['KERNELS'] = array();
+
+    if($force || !isset($this->cache['KERNELS'][$release])){
       $o_queue = new gosaSupportDaemon();
       $tmp = $o_queue->FAI_get_kernels($release);
       $this->cache['KERNELS'][$release] = array();
@@ -1233,10 +1235,12 @@ class workstartup extends plugin
   function get_invalid_classes($classes)
   {
     $this->update_fai_cache();
-    if($this->FAIdebianMirror == "inherited"){
+    if($this->FAIdebianMirror == "inherited" && isset($this->cache['CLASSES'][$this->InheritedFAIrelease])){
       $release_classes = $this->cache['CLASSES'][$this->InheritedFAIrelease];
-    }else{
+    }elseif(isset($this->cache['CLASSES'][$this->FAIrelease])){
       $release_classes = $this->cache['CLASSES'][$this->FAIrelease];
+    }else{
+      $release_classes = array();
     }
 
 
@@ -1259,10 +1263,12 @@ class workstartup extends plugin
   {
     $this->update_fai_cache();
 
-    if($this->FAIdebianMirror == "inherited"){
+    if($this->FAIdebianMirror == "inherited" && isset($this->cache['CLASSES'][$this->InheritedFAIrelease])){
       $classes = $this->cache['CLASSES'][$this->InheritedFAIrelease];
-    }else{
+    }elseif(isset($this->cache['CLASSES'][$this->FAIrelease])){
       $classes = $this->cache['CLASSES'][$this->FAIrelease];
+    }else{
+      $classes = array();
     }
 
     $Abbr ="";