From: hickert Date: Fri, 20 Jun 2008 08:22:51 +0000 (+0000) Subject: Fixed some undefined index warnings if no FAI classes are available in workstation... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b8fc9b81ee9fd856f5dd4056eed3dfe04bba91bd;p=gosa.git Fixed some undefined index warnings if no FAI classes are available in workstation Startup git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11388 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc index 4d2ea8c6f..b89cff375 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc @@ -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 ="";