Code

Fixed inherit option.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 11 Aug 2006 06:48:29 +0000 (06:48 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 11 Aug 2006 06:48:29 +0000 (06:48 +0000)
Fixed undefined index problem, if there is no fai object available

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

plugins/admin/systems/class_terminalStartup.inc
plugins/admin/systems/class_workstationStartup.inc

index c7bafb9c2beabb8c4980721ea4d3536660662774..77e45245d91a8524ddaf1555328b34d33fe54899 100644 (file)
@@ -142,7 +142,7 @@ class termstartup extends plugin
             $this->goLdapServerList= array_merge(array('default-inherit' => _("inherited").' ['.$attrs[$name][0].']' ), $this->goLdapServerList);
             break;
           case 'gotoBootKernel':
-            $this->gotoBootKernels= array_merge(array('default-inherit' => _("inherited").' ['.$attrs[$name][0].']' ), $this->goLdapServerList);
+            $this->gotoBootKernels= array_merge(array('default-inherit' => _("inherited").' ['.$attrs[$name][0].']' ), $this->gotoBootKernels);
             break;
         }
       }
index 9c9087eb89fdfbfa601778df6caed0551e1c167f..d6743a295005fd2072b8dba29c0dc0722fc92c2f 100644 (file)
@@ -277,7 +277,7 @@ class workstartup extends plugin
     $ldap->cd($this->config->current['BASE']);
     $ldap->search("(&(objectClass=gotoWorkstationTemplate)(member=".$this->dn."))");
     if ($ldap->count() == 1){
-      $map= array("gotoLdapServer","FAIclass","FAIdebianMirror");
+      $map= array("gotoLdapServer","FAIclass","FAIdebianMirror","gotoBootKernel");
       $attrs= $ldap->fetch();
 
       foreach ($map as $name){
@@ -820,24 +820,25 @@ class workstartup extends plugin
     }
 
     $errorClasses = "";  
-  
-    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(is_array($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($use){
-        $ret[$release]=$release;
+        if($use){
+          $ret[$release]=$release;
+        }
       }
     } 
     if((count($ret) == 0 ) && ($this->FAIdebianMirror != "auto")){