diff --git a/felamimail/inc/class.uisieve.inc.php b/felamimail/inc/class.uisieve.inc.php index 7346e350c5..f9aa9d5a9e 100644 --- a/felamimail/inc/class.uisieve.inc.php +++ b/felamimail/inc/class.uisieve.inc.php @@ -295,7 +295,7 @@ } else { - $this->errorStack['message'] = lang('Vacation notice is not saved yet! (But we filled in some defaults to cover some of the above errors. Please correct and check your settings and save again.)'); + $this->errorStack['message'] = lang('Vacation notice is not saved yet! (But we filled in some defaults to cover some of the above errors. Please correct and check your settings and save again.)'); return false; } } @@ -509,7 +509,11 @@ $this->rules[$ruleID] = $newRule; - $this->bosieve->setRules($this->scriptName, $this->rules); + $ret = $this->bosieve->setRules($this->scriptName, $this->rules); + if (!$ret && !empty($this->bosieve->error)) + { + $msg .= lang("Saving the rule failed:")."
".$this->bosieve->error."
"; + } $this->saveSessionData(); } else { @@ -517,7 +521,7 @@ $error++; } // refresh the list - $js = "opener.location.href = '".addslashes(egw::link('/index.php','menuaction=felamimail.uisieve.listRules'))."';"; + $js = "opener.location.href = '".addslashes(egw::link('/index.php',array('menuaction'=>'felamimail.uisieve.listRules','message'=>$msg)))."';"; if(isset($_POST['save']) && $error == 0) { echo "\n"; } else { @@ -853,7 +857,17 @@ // translate most of the parts $this->translate(); - + $errorMessage = get_var('message',array('GET')); + if (!empty($errorMessage)) + { + $errorMessage = html::purify($errorMessage); + $this->t->set_var('message',$errorMessage); + unset($_GET['message']); + } + else + { + $this->t->set_var('message',''); + } #if(!empty($this->scriptToEdit)) #{ $listOfImages = array( diff --git a/felamimail/templates/default/listRules.tpl b/felamimail/templates/default/listRules.tpl index 8277f0af9e..9ab3949063 100644 --- a/felamimail/templates/default/listRules.tpl +++ b/felamimail/templates/default/listRules.tpl @@ -11,7 +11,7 @@ var refreshURL='{refreshURL}';
- +
{message}
- \ No newline at end of file +
@@ -61,4 +61,4 @@ var refreshURL='{refreshURL}'; Move rule down