From 33ec2814249a63a7202e36fde7434d00332f3fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 5 Jan 2014 18:44:19 +0100 Subject: [PATCH] Removed unexisting input checks in poll creation --- htdocs/opensurvey/public/create_survey.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/opensurvey/public/create_survey.php b/htdocs/opensurvey/public/create_survey.php index 9a178b280ee..f3851648d25 100644 --- a/htdocs/opensurvey/public/create_survey.php +++ b/htdocs/opensurvey/public/create_survey.php @@ -34,7 +34,7 @@ $origin=GETPOST('origin','alpha'); // On teste toutes les variables pour supprimer l'ensemble des warnings PHP // On transforme en entites html les données afin éviter les failles XSS -$post_var = array('titre', 'nom', 'adresse', 'commentaires', 'mailsonde', 'creation_sondage_date', 'creation_sondage_date_x', 'creation_sondage_autre', 'creation_sondage_autre_x'); +$post_var = array('titre', 'nom', 'adresse', 'commentaires', 'mailsonde', 'creation_sondage_date', 'creation_sondage_autre'); foreach ($post_var as $var) { $$var = GETPOST($var); @@ -53,7 +53,7 @@ $cocheplus = ''; $cochemail = ''; // Jump to correct page -if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre") || GETPOST("creation_sondage_date_x") || GETPOST("creation_sondage_autre_x")) +if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre")) { $_SESSION["titre"] = $titre; $_SESSION["nom"] = $nom; @@ -144,7 +144,7 @@ print '
'."\n"; print ''."\n"; print ''."\n"; -if (! $_SESSION["titre"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre') || GETPOST('creation_sondage_date_x') || GETPOST('creation_sondage_autre_x'))) +if (! $_SESSION["titre"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) { setEventMessage($langs->trans("FieldMandatory"), 'errors'); } @@ -156,7 +156,7 @@ print ''."\n"; -if (! $_SESSION["nom"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre') || GETPOST('creation_sondage_date_x') || GETPOST('creation_sondage_autre_x'))) +if (! $_SESSION["nom"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) { setEventMessage($langs->trans("FieldMandatory"), 'errors'); } @@ -166,10 +166,10 @@ print ''."\n"; -if (!$_SESSION["adresse"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre') || GETPOST('creation_sondage_date_x') || GETPOST('creation_sondage_autre_x'))) +if (!$_SESSION["adresse"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) { setEventMessage($langs->trans("FieldMandatory"), 'errors'); -} elseif ($erreur_adresse && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre') || GETPOST('creation_sondage_date_x') || GETPOST('creation_sondage_autre_x'))) +} elseif ($erreur_adresse && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) { $langs->load('errors'); setEventMessage($langs->trans("ErrorBadEMail", $adresse), 'errors');
'. $langs->trans("PollTitle") .'
'. $langs->trans("OpenSurveyYourName") .'
'. $langs->trans("OpenSurveyYourEMail") . print '