From 8bd2772f52d494496dae615d2870ae13c1bb4907 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 18 Oct 2006 10:20:15 +0000 Subject: [PATCH] Keep selected classes in case of an error. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4896 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/class_workstationStartup.inc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index 812a48982..3d4d1300d 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -42,6 +42,7 @@ class workstartup extends plugin var $FAIrelease = ""; var $FAIdebianMirror = "auto"; + var $unresolved_classes = array(); /* FAI class selection */ var $InheritedFAIclass = array(); @@ -682,6 +683,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()); @@ -706,6 +708,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{ @@ -720,7 +727,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;'") )); } @@ -864,8 +871,10 @@ class workstartup extends plugin $eClasses .= $class." "; } - $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"; + //$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. Server was reset to 'auto'."),$eClasses)); } return($ret); } -- 2.30.2