summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 218eee6)
raw | patch | inline | side by side (parent: 218eee6)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 29 Mar 2007 09:39:45 +0000 (09:39 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 29 Mar 2007 09:39:45 +0000 (09:39 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5925 594d385d-05f5-0310-b6e9-bd551577e9d8
index 9de56b29ad0ceeeb3106c52e0f938d2562254134..686d457221eca9b87ee3e7875d8c89d89fef64e0 100644 (file)
$parsed = $this->_parsed;
}
+ if($parsed == NULL) {
+ return(array(_("Can't save empty tests.")));
+ }
+
/* Walk through all elements */
foreach($parsed as $key => $data){
$parsed = $this->_parsed;
}
- if(!is_array($parsed)) return;
+ if(!is_array($parsed)) {
+ return;
+ }
/* Walk through all elements */
foreach($parsed as $key => $data){
$smarty->assign("DisplayAdd",TRUE);
$smarty->assign("DisplayDel",FALSE);
$cont_tmp = $smarty->fetch(get_template_path("templates/object_test_container.tpl",TRUE,dirname(__FILE__)));
- $cont_tmp = preg_replace("/%%OBJECT_CONTENT%%/",_("Click here to add a new test"),$cont_tmp);
+ $cont_tmp = preg_replace("/%%OBJECT_CONTENT%%/","<b>"._("Click here to add a new test")."</b>",$cont_tmp);
$smarty->assign("Inverse",$Inverse);
$smarty->assign("Contents",$cont_tmp.$Contents);
diff --git a/include/sieve/class_sieveElement_Reject.inc b/include/sieve/class_sieveElement_Reject.inc
index 398f6ed3644c511f295ca5096c8e4f42e6853ece..baa100449d292fe32620f784a2d7ed2990a76a88 100644 (file)
function check()
{
- return(array());
+ $msgs = array();
+ if(preg_match("/\"/",$this->data)){
+ $msgs [] = _("Invalid character found, quotes are not allowed in a reject message.");
+ }
+ return($msgs);
}
function sieve_reject($data,$object_id,$parent)
$smarty->assign("ID", $this->object_id);
$smarty->assign("Message",$this->data);
$smarty->assign("Multiline",$Multiline);
+ $smarty->assign("LastError" , $this->check());
+ $smarty->assign("LastErrorCnt" , count($this->check()));
$object_container = $smarty->fetch(get_template_path("templates/object_container.tpl",TRUE,dirname(__FILE__)));
$object= $smarty->fetch(get_template_path("templates/element_reject.tpl",TRUE,dirname(__FILE__)));
$str = preg_replace("/%%OBJECT_CONTENT%%/",addcslashes($object,"\\"),$object_container);
index 15606ce3d955dfcc764b9931425fb8e38af2d6b6..cde2d8540861c61a2322b8722dca02fda503adda 100644 (file)
print_red($p->status_text);;
}
}else{
- print_red(_("Please fix all errors before saving."));
+ foreach($chk as $msgs){
+ print_red(sprintf(_("Please fix all errors before saving. Last error was : %s"),$msgs));
+ }
}
}
diff --git a/include/sieve/templates/element_reject.tpl b/include/sieve/templates/element_reject.tpl
index 60163c2f9b68c7423b5b86d511238c2664a07ede..c9de8b50e19c583a6fdc027d98516c506bd4050d 100644 (file)
<table class='sieve_reject_container'>
+
+{foreach from=$LastError item=val key=key}
+ <tr>
+ <td colspan=4>
+ <div class='sieve_error_msgs'>{$LastError[$key]}</div>
+
+ </td>
+ </tr>
+
+ {/foreach}
<tr>
<td>
<b>{t}Reject mail{/t}</b>