mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 08:23:12 +01:00
* email/sieve: improved vacation script handling: be more talkative to the user on rule validation errors while saving
This commit is contained in:
parent
bd616f8a34
commit
bc1145533c
@ -363,8 +363,8 @@ class emailadmin_script {
|
||||
|
||||
if ($this->vacation) {
|
||||
$vacation = $this->vacation;
|
||||
if (!$vacation['days']) $vacation['days'] = $default->vacation_days;
|
||||
if (!$vacation['text']) $vacation['text'] = $default->vacation_text;
|
||||
if (!$vacation['days']) $vacation['days'] = ($default->vacation_days ? $default->vacation_days:'');
|
||||
if (!$vacation['text']) $vacation['text'] = ($default->vacation_text ? $default->vacation_text:'');
|
||||
if (!$vacation['status']) $vacation['status'] = 'on';
|
||||
|
||||
// filter out invalid addresses.
|
||||
@ -505,9 +505,10 @@ class emailadmin_script {
|
||||
|
||||
$newscript = $newscripthead . $newscriptbody . $newscriptfoot;
|
||||
$this->script = $newscript;
|
||||
#print "<pre>$newscript</pre>"; exit;
|
||||
//error_log(__METHOD__.__LINE__.array2string($newscript));
|
||||
//print "<pre>$newscript</pre>"; exit;
|
||||
$scriptfile = $this->name;
|
||||
#print "<hr><pre>".htmlentities($newscript)."</pre><hr>";
|
||||
//print "<hr><pre>".htmlentities($newscript)."</pre><hr>";
|
||||
if (!$connection->installScript($this->name, $newscript, true)) {
|
||||
$this->errstr = 'updateScript: putscript failed: ' . $connection->errstr;
|
||||
error_log(__METHOD__.__LINE__.' # Error: ->'.$this->errstr);
|
||||
|
@ -287,6 +287,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.)');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -601,6 +602,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
if(isset($_POST['save'])) unset($_POST['save']);
|
||||
$this->t->set_var('validation_errors',implode('<br />',$this->errorStack));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user