From: hickert Date: Wed, 10 Jan 2007 11:55:13 +0000 (+0000) Subject: Allow "-100324" "12343-" in size field of fai partition table entries. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=bdb0ce270b36bc93d03a5f94126230c525e08d2b;p=gosa.git Allow "-100324" "12343-" in size field of fai partition table entries. Added fix from stable revision 5703 Do not allow spaces within class names. Remember entered class name in "aslclassname" dialog git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5514 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/fai/askClassName.tpl b/plugins/admin/fai/askClassName.tpl index 526b6a587..f972210a7 100644 --- a/plugins/admin/fai/askClassName.tpl +++ b/plugins/admin/fai/askClassName.tpl @@ -29,7 +29,7 @@   - {t}Class name{/t}  + {t}Class name{/t}  diff --git a/plugins/admin/fai/class_askClassName.inc b/plugins/admin/fai/class_askClassName.inc index b9f854f75..3486cc3c4 100644 --- a/plugins/admin/fai/class_askClassName.inc +++ b/plugins/admin/fai/class_askClassName.inc @@ -114,6 +114,7 @@ class askClassName extends plugin $smarty->assign("grey", ""); } $smarty->assign("ClassNames", $used); + $smarty->assign("ClassName", $this->ClassName); $display.= $smarty->fetch(get_template_path('askClassName.tpl', TRUE)); return($display); } @@ -142,6 +143,10 @@ class askClassName extends plugin /* Call common method to give check the hook */ $message= plugin::check(); + if($this->ClassName != preg_replace("/ /","",trim($this->ClassName))){ + $message[] = _("Spaces are not allowed within class names."); + } + if(empty($this->ClassName)){ $message[]=_("The given class name is empty."); } diff --git a/plugins/admin/fai/class_faiPackage.inc b/plugins/admin/fai/class_faiPackage.inc index 51df0c833..8b2cc7e83 100644 --- a/plugins/admin/fai/class_faiPackage.inc +++ b/plugins/admin/fai/class_faiPackage.inc @@ -409,7 +409,8 @@ class faiPackage extends plugin $dsc= ""; if (preg_match('/^-/', $usedName)){ $dsc= " - "._("Package marked for removal"); - $usedName2= preg_replace('/^-/', '! ', $usedName); + // Generally a bad idea here, because the toggel triggers on -, not on ! + //$usedName= preg_replace('/^-/', '! ', $usedName); }else{ $usedName2= $usedName; } diff --git a/plugins/admin/fai/class_faiPartitionTableEntry.inc b/plugins/admin/fai/class_faiPartitionTableEntry.inc index 57dc434b9..9122d6c3c 100644 --- a/plugins/admin/fai/class_faiPartitionTableEntry.inc +++ b/plugins/admin/fai/class_faiPartitionTableEntry.inc @@ -337,7 +337,6 @@ class faiPartitionTableEntry extends plugin if((isset($_POST['TableEntryFrameSubmitted'])) && ($this->FAIstate != "freeze") ){ - print_a($_POST); plugin::save_object(); foreach($this->partitions as $key => $part){ @@ -417,7 +416,7 @@ class faiPartitionTableEntry extends plugin break; case 2: - if((!is_id($tmp[0]))||(!is_id($tmp[1]))){ + if((!is_id($tmp[0]))&&(!is_id($tmp[1]))){ $message[]=sprintf(_("Please enter a valid range for partition %s."),($key)); }elseif($tmp[0]>=$tmp[1]){ $message[]=sprintf(_("Please enter a valid range for partition %s."),($key));