X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fsieve%2Fclass_sieveManagement.inc;h=ba01e0cf3aaa0bbe50a4a26b2d617e99b4afca3a;hb=0d96e184dc6107bff6f32f24b4cda64ddd01c35a;hp=4124232881614e89532f223d2d636222d00cfb62;hpb=c090b85aec5294de328a371b42c1a81f9160b345;p=gosa.git diff --git a/include/sieve/class_sieveManagement.inc b/include/sieve/class_sieveManagement.inc index 412423288..ba01e0cf3 100644 --- a/include/sieve/class_sieveManagement.inc +++ b/include/sieve/class_sieveManagement.inc @@ -191,31 +191,35 @@ class sieveManagement extends plugin } /* Check given name */ - $err = ""; + $err = false; /* Is given name in lower case characters ? */ if(isset($_POST['create_script_save'])){ if(!strlen($name)){ - $err = _("You should specify a name for your new script."); + $err =true; + print_red(_("You should specify a name for your new script.")); } /* Is given name in lower case characters ? */ if($name != strtolower($name)){ - $err = _("Only lower case names are allowed here."); + $err =true; + print_red(_("Only lower case names are allowed.")); } /* Only chars are allowed here */ if(preg_match("/[^a-z]/i",$name)){ - $err = _("Only a-z are allowed in script names."); + $err =true; + print_red(_("Only alphabetical characters are allowed in script names.")); } $tmp = $this->get_used_script_names(); if(in_array_ics($name,$tmp)){ - $err =_("The specified name is already in use."); + $err =true; + print_red(_("The specified name is already in use.")); } } /* Create script if everything is ok */ - if($this->create_script && isset($_POST['create_script_save']) && $err == "" ){ + if($this->create_script && isset($_POST['create_script_save']) && !$err){ /* Close dialog */ $this->create_script = FALSE; @@ -252,7 +256,6 @@ class sieveManagement extends plugin /* Display dialog to enter new script name */ $smarty = get_smarty(); $smarty->assign("NewScriptName",$name); - $smarty->assign("Error",$err); return($smarty->fetch(get_template_path("templates/create_script.tpl",TRUE,dirname(__FILE__)))); } } @@ -430,7 +433,7 @@ class sieveManagement extends plugin $file = $_FILES['Script_To_Import']; if($file['size'] == 0){ - print_red(_("Specified file seams to empty.")); + print_red(_("Specified file seems to be empty.")); }elseif(!file_exists($file['tmp_name'])){ print_red(_("Upload failed, somehow nothing was uploaded or the temporary file can't be accessed.")); }elseif(!is_readable ($file['tmp_name'])){ @@ -565,7 +568,7 @@ class sieveManagement extends plugin if(!$else_found && (!(get_class($obj) == "sieve_if" && $elsif_found))){ $element_types['sieve_else'] = _("Else"); } - $element_types['sieve_elsif'] = _("Else if"); + $element_types['sieve_elsif'] = _("Else If"); } } } @@ -662,6 +665,8 @@ class sieveManagement extends plugin "attach" => "style='border-right:0px; width:70px;'"); $List->AddEntry(array($field1,$field2,$field3,$field4,$field6)); } + + $List->SetHeight(400); /* If the uattrib is empty (Attribute to use for authentification with sieve) * Display a message that the connection can't be established. @@ -758,12 +763,12 @@ class sieveManagement extends plugin if(!$else_found && (!(get_class($obj) == "sieve_if" && $elsif_found))){ $element_types['sieve_else'] = _("Else"); } - $element_types['sieve_elsif'] = _("Else if"); + $element_types['sieve_elsif'] = _("Else If"); }else{ /* Allow adding elsif above elsif */ if(in_array(get_class($obj),array("sieve_elsif"))){ - $element_types['sieve_elsif'] = _("Else if"); + $element_types['sieve_elsif'] = _("Else If"); } } }