From 52f421072615614725d82f4acd7632282d0db50f Mon Sep 17 00:00:00 2001
From: Bob Le Bricodeur <Mr.Bricodage@gmail.com>
Date: Sat, 15 Nov 2014 01:27:38 +0100
Subject: [PATCH] reuse condition from choix_autre.php for Step 1 validation

---
 choix_date.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/choix_date.php b/choix_date.php
index 0531b4ed..0280ab17 100644
--- a/choix_date.php
+++ b/choix_date.php
@@ -29,7 +29,7 @@ if (is_readable('bandeaux_local.php')) {
 }
 
 // Step 1/3 : error if $_SESSION from info_sondage are not valid
-if (!Utils::issetAndNoEmpty('nom', $_SESSION) && !Utils::issetAndNoEmpty('adresse', $_SESSION) && !Utils::issetAndNoEmpty('commentaires', $_SESSION) && !Utils::issetAndNoEmpty('mail', $_SESSION)) {
+if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmpty('nom', $_SESSION) === false || (($config['use_smtp']) ? Utils::issetAndNoEmpty('adresse', $_SESSION) === false : false)) {
 
     Utils::print_header ( _("Error!") );
     bandeau_titre(_("Error!"));
-- 
GitLab