Code

Create faiPackageList:
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 15 Feb 2007 10:58:49 +0000 (10:58 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 15 Feb 2007 10:58:49 +0000 (10:58 +0000)
-Avoid several undefined index errors, if there is no server available that supports the selected release

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5720 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/fai/class_faiPackage.inc

index edadc11a089565d2cc65665b248e54e0a50846b0..0635c85e4defc885e0254d02d02a67aed446f3d7 100644 (file)
@@ -195,8 +195,14 @@ class faiPackage extends plugin
 
       /* Assemble sections */
       $repos= $this->getServerInfos();
-      $this->FAIdebianSection= $repos[$this->FAIdebianRelease];
-      $this->FAIdebianSection= array_unique($this->FAIdebianSection);
+
+      if(isset($repos[$this->FAIdebianRelease])){
+        $this->FAIdebianSection= $repos[$this->FAIdebianRelease];
+        $this->FAIdebianSection= array_unique($this->FAIdebianSection);
+      }else{
+        $this->FAIdebianSection = array();
+        print_red(sprintf(_("No repository server found that provide this release '%s'."), $this->FAIdebianRelease));
+      }
 
       /* Assign Repository settings*/ 
       $this->is_account     = true;