From 1aef94735ccec795cb65f8b68ba790a29d1e8e42 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 13 May 2014 08:51:03 +0000 Subject: [PATCH] Check validation for addresses in "Respond" field, and make "text and Respond" fields required --- mail/inc/class.mail_sieve.inc.php | 2 +- mail/templates/default/sieve.vacation.xet | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mail/inc/class.mail_sieve.inc.php b/mail/inc/class.mail_sieve.inc.php index bb2db674b4..e37f5932a2 100644 --- a/mail/inc/class.mail_sieve.inc.php +++ b/mail/inc/class.mail_sieve.inc.php @@ -690,7 +690,7 @@ class mail_sieve $this->errorStack['days'] = lang('Please select the number of days to wait between responses').'!'; } - if(is_array($_vacation['addresses'])) + if(is_array($_vacation['addresses']) && !empty($_vacation['addresses'])) { $regexp="/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i"; foreach ($_vacation['addresses'] as $addr) diff --git a/mail/templates/default/sieve.vacation.xet b/mail/templates/default/sieve.vacation.xet index bc0f6dfd77..c93ee61465 100644 --- a/mail/templates/default/sieve.vacation.xet +++ b/mail/templates/default/sieve.vacation.xet @@ -25,7 +25,7 @@ - +