mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-27 02:14:45 +01:00
* email: sieve, option to disable the validation of used addresses; that way you may use mail-server internal names for vacation notices
This commit is contained in:
parent
4775a62bdb
commit
56f1b4c32b
@ -228,7 +228,7 @@
|
||||
return @htmlspecialchars($vacation_str, ENT_QUOTES, $GLOBALS['egw']->translation->charset());
|
||||
}
|
||||
|
||||
function checkRule($_vacation)
|
||||
function checkRule($_vacation,$_checkAddresses=true)
|
||||
{
|
||||
$this->errorStack = array();
|
||||
|
||||
@ -247,7 +247,7 @@
|
||||
$regexp="/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i";
|
||||
foreach ($_vacation['addresses'] as $addr)
|
||||
{
|
||||
if (!preg_match($regexp,$addr))
|
||||
if (!preg_match($regexp,$addr) && $_checkAddresses)
|
||||
{
|
||||
$this->errorStack['addresses'] = lang('One address is not valid'.'!');
|
||||
}
|
||||
@ -274,7 +274,7 @@
|
||||
{
|
||||
foreach(preg_split('/, ?/',$_vacation['forwards']) as $addr)
|
||||
{
|
||||
if (!preg_match($regexp,$addr))
|
||||
if (!preg_match($regexp,$addr) && $_checkAddresses)
|
||||
{
|
||||
$this->errorStack['forwards'] = lang('One address is not valid'.'!');
|
||||
}
|
||||
@ -575,6 +575,7 @@
|
||||
}
|
||||
$this->t->set_var('set_as_default','<input type="submit" name="set_as_default" value="'.htmlspecialchars(lang('Set as default')).'" />');
|
||||
}
|
||||
$checkAddresses=(get_var('check_mail_sent_to',array('POST'))=='off'?false:true);
|
||||
if(isset($_POST["vacationStatus"]))
|
||||
{
|
||||
$newVacation['text'] = get_var('vacation_text',array('POST'));
|
||||
@ -604,7 +605,7 @@
|
||||
}
|
||||
if(isset($_POST['save']) || isset($_POST['apply']))
|
||||
{
|
||||
if($this->checkRule($newVacation))
|
||||
if($this->checkRule($newVacation,$checkAddresses))
|
||||
{
|
||||
if (!$this->bosieve->setVacation($this->scriptName, $newVacation))
|
||||
{
|
||||
@ -652,6 +653,14 @@
|
||||
{
|
||||
$this->t->set_var('checked_disabled', 'checked');
|
||||
}
|
||||
if($checkAddresses)
|
||||
{
|
||||
$this->t->set_var('check_mail_sent_to_active', 'checked');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->t->set_var('check_mail_sent_to_disabled', 'checked');
|
||||
}
|
||||
|
||||
// vacation text
|
||||
if (empty($vacation['text'])) {
|
||||
@ -1052,6 +1061,7 @@
|
||||
$this->t->set_var("lang_edit_vacation_settings",lang('edit vacation settings'));
|
||||
$this->t->set_var("lang_every",lang('every'));
|
||||
$this->t->set_var('lang_respond_to_mail_sent_to',lang('respond to mail sent to'));
|
||||
$this->t->set_var('lang_check_mail_sent_to',lang('validate mail sent to'));
|
||||
$this->t->set_var('lang_filter_rules',lang('filter rules'));
|
||||
$this->t->set_var('lang_vacation_notice',lang('vacation notice'));
|
||||
$this->t->set_var("lang_with_message",lang('with message'));
|
||||
|
@ -561,6 +561,7 @@ vacation notice is active felamimail de Abwesenheitsnotiz ist aktiv
|
||||
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.) felamimail de Die Urlaubsnachricht ist noch nicht gespeichert! (Wir haben einige Standartwerte gesetzt, um einige der oben gemeldeten Probleme zu beheben. Bitte prüfen/korrigieren Sie Ihre Einstellungen und speichern diese erneut ab)
|
||||
vacation start-date must be before the end-date! felamimail de Startdatum der Urlaubsbenachrichtigung muss VOR dem Endedatum liegen!
|
||||
validate certificate felamimail de Zertifikat überprüfen
|
||||
validate mail sent to felamimail de Überprüfe die ausgewählten Adressen beim Abschicken des Formulars
|
||||
view full header felamimail de alle Kopfzeilen anzeigen
|
||||
view header lines felamimail de Kopfzeilen anzeigen
|
||||
view message felamimail de zeige Nachricht
|
||||
|
@ -562,6 +562,7 @@ vacation notice is active felamimail en Vacation notice is active
|
||||
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.) felamimail en 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.)
|
||||
vacation start-date must be before the end-date! felamimail en Vacation start date must be BEFORE the end date!
|
||||
validate certificate felamimail en Validate certificate
|
||||
validate mail sent to felamimail en Validate selected addresses on submit
|
||||
view full header felamimail en View full header
|
||||
view header lines felamimail en View header lines
|
||||
view message felamimail en View message
|
||||
|
@ -228,6 +228,15 @@ function submitIt()
|
||||
{multiSelectBox}
|
||||
</td>
|
||||
</tr>
|
||||
<tr CLASS="sieveRowActive">
|
||||
<td>
|
||||
{lang_check_mail_sent_to}:
|
||||
</td>
|
||||
<td nowrap="nowrap">
|
||||
<input type="radio" name="check_mail_sent_to" {check_mail_sent_to_active} value="on" id="check_mail_sent_to_active"> <label for="check_mail_sent_to_active">{lang_active}</label>
|
||||
<input type="radio" name="check_mail_sent_to" {check_mail_sent_to_disabled} value="off" id="check_mail_sent_to_disabled"> <label for="check_mail_sent_to_disabled">{lang_disabled}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr CLASS="sieveRowActive">
|
||||
<td>
|
||||
{lang_every}:
|
||||
|
Loading…
Reference in New Issue
Block a user