From 30254766d3ee9f2d3a8da938a60ee2b2cf5e397f Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 11 Aug 2006 06:48:29 +0000 Subject: [PATCH] Fixed inherit option. 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 --- .../admin/systems/class_terminalStartup.inc | 2 +- .../systems/class_workstationStartup.inc | 33 ++++++++++--------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/plugins/admin/systems/class_terminalStartup.inc b/plugins/admin/systems/class_terminalStartup.inc index c7bafb9c2..77e45245d 100644 --- a/plugins/admin/systems/class_terminalStartup.inc +++ b/plugins/admin/systems/class_terminalStartup.inc @@ -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; } } diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index 9c9087eb8..d6743a295 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -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")){ -- 2.30.2