From: hickert Date: Wed, 18 Oct 2006 10:44:29 +0000 (+0000) Subject: Added WS Startup fix. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=819cbb6862867ab7550dc799c7122bb9350cd0fe;p=gosa.git Added WS Startup fix. Selected FAI classes were resetted in case of an error; git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4897 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index e2b198c20..53a2fcc88 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -41,6 +41,8 @@ class workstartup extends plugin var $FAIrelease = ""; var $FAIdebianMirror = "auto"; + var $unresolved_classes = array(); + /* FAI class selection */ var $InheritedFAIclass = array(); @@ -265,7 +267,6 @@ class workstartup extends plugin /* Handle inheritance value "default" */ $this->gotoBootKernels= array("default-inherited" => '['._("inherited").']'); - /* Load hardware list */ $ldap= $this->config->get_ldap_link(); $ldap->cd($this->config->current['BASE']); @@ -685,6 +686,7 @@ class workstartup extends plugin } $smarty->assign("FAIdebianMirrors",$this->getFAIdebianMirrors()); + $smarty->assign("FAIdebianMirror",$this->FAIdebianMirror); $smarty->assign("FAIreleases",$this->getFAIreleases()); $smarty->assign("FAIrelease",$this->FAIrelease); $smarty->assign("FAIclasses",$this->selectFriendlyClasses()); @@ -714,6 +716,11 @@ class workstartup extends plugin foreach($tmp as $class){ + $marker = ""; + if(in_array_ics($class,$this->unresolved_classes)){ + $marker = " ("._("Not available in current setup").")"; + } + if($this->FAIdebianMirror == "inherited"){ $str = ""; }else{ @@ -728,7 +735,7 @@ class workstartup extends plugin $i ++ ; $div->AddEntry(array( - array("string"=>$class), + array("string"=>$class.$marker), array("string"=>preg_replace("/\%s/",base64_encode($class),$str),"attach"=>"style='width:50px;border-right:none;'") )); } @@ -866,8 +873,10 @@ class workstartup extends plugin $eClasses = preg_replace("/ */","",$eClasses); if(!empty($eClasses)) { - $this->FAIclass= array(); - print_red(sprintf(_("Can't resolve the given FAIclass(es) [%s] anyway, please check your FAI configurations, possibly some classes where deleted or renamed. !All classes have been removed from this account, press cancel if you don't want this to be saved."),$eClasses)); + + $this->unresolved_classes = $errorClasses; + $this->FAIdebianMirror = "auto"; + print_red(sprintf(_("Can't resolve the given FAIclass(es) [%s] anyway, please check your FAI configurations, possibly some classes where deleted or renamed. Server was reset to 'auto'."),$eClasses)); } } return($ret);