Removed unused/unuseful injection checks on open survey creation
This commit is contained in:
parent
dd8d8e8e42
commit
89c6aa2d87
@ -73,6 +73,5 @@ PublicLinkToCreateSurvey=Public link to allow everybody to create a survey
|
|||||||
ErrorOpenSurveyFillFirstSection=You haven't filled the first section of the poll creation
|
ErrorOpenSurveyFillFirstSection=You haven't filled the first section of the poll creation
|
||||||
ErrorOpenSurveyOneChoice=Enter at least one choice
|
ErrorOpenSurveyOneChoice=Enter at least one choice
|
||||||
ErrorOpenSurveyDateFormat=Date must be have the format DD/MM/YYYY
|
ErrorOpenSurveyDateFormat=Date must be have the format DD/MM/YYYY
|
||||||
ErrorOpenSurveyInvalidChars=Characters \" < and > are not permitted
|
|
||||||
MoreChoices=Enter more choices for the voters
|
MoreChoices=Enter more choices for the voters
|
||||||
AfterCreationInfo=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll. <br>Then, you will receive quickly an email contening the link to your poll for sending it to the voters.
|
AfterCreationInfo=Once you have confirmed the creation of your poll, you will be automatically redirected on the page of your poll. <br>Then, you will receive quickly an email contening the link to your poll for sending it to the voters.
|
||||||
@ -42,7 +42,6 @@ $origin=GETPOST('origin','alpha');
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Set session vars
|
// Set session vars
|
||||||
$erreur_injection = false;
|
|
||||||
if (isset($_SESSION["nbrecases"])) {
|
if (isset($_SESSION["nbrecases"])) {
|
||||||
for ($i = 0; $i < $_SESSION["nbrecases"]; $i++) {
|
for ($i = 0; $i < $_SESSION["nbrecases"]; $i++) {
|
||||||
if (isset($_POST["choix"][$i])) {
|
if (isset($_POST["choix"][$i])) {
|
||||||
@ -188,11 +187,7 @@ if ($testdate === false) {
|
|||||||
print "<br><font color=\"#FF0000\">" . $langs->trans("ErrorOpenSurveyDateFormat") . "</font><br><br>"."\n";
|
print "<br><font color=\"#FF0000\">" . $langs->trans("ErrorOpenSurveyDateFormat") . "</font><br><br>"."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($erreur_injection) {
|
if ((isset($_POST["fin_sondage_autre"]) || isset($_POST["fin_sondage_autre_x"])) && !$erreur) {
|
||||||
print "<font color=#FF0000>" . $langs->trans("ErrorOpenSurveyInvalidChars") . "</font><br><br>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((isset($_POST["fin_sondage_autre"]) || isset($_POST["fin_sondage_autre_x"])) && !$erreur && !$erreur_injection) {
|
|
||||||
//demande de la date de fin du sondage
|
//demande de la date de fin du sondage
|
||||||
print '<br>'."\n";
|
print '<br>'."\n";
|
||||||
print '<div class=presentationdatefin>'."\n";
|
print '<div class=presentationdatefin>'."\n";
|
||||||
|
|||||||
@ -51,9 +51,6 @@ foreach ($session_var as $var)
|
|||||||
|
|
||||||
// On initialise également les autres variables
|
// On initialise également les autres variables
|
||||||
$erreur_adresse = false;
|
$erreur_adresse = false;
|
||||||
$erreur_injection_titre = false;
|
|
||||||
$erreur_injection_nom = false;
|
|
||||||
$erreur_injection_commentaires = false;
|
|
||||||
$cocheplus = '';
|
$cocheplus = '';
|
||||||
$cochemail = '';
|
$cochemail = '';
|
||||||
|
|
||||||
@ -86,9 +83,7 @@ if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre") || GET
|
|||||||
|
|
||||||
if (! isValidEmail($adresse)) $erreur_adresse = true;
|
if (! isValidEmail($adresse)) $erreur_adresse = true;
|
||||||
|
|
||||||
//var_dump($titre.' - '.$nom.' - '.$adresse.' - '.!$erreur_adresse.' - '.! $erreur_injection_titre.' - '.! $erreur_injection_commentaires.' - '.! $erreur_injection_nom.' - '.$creation_sondage_date.' - '.$creation_sondage_autre); exit;
|
if ($titre && $nom && $adresse && !$erreur_adresse)
|
||||||
|
|
||||||
if ($titre && $nom && $adresse && !$erreur_adresse && ! $erreur_injection_titre && ! $erreur_injection_commentaires && ! $erreur_injection_nom)
|
|
||||||
{
|
{
|
||||||
if (! empty($creation_sondage_date))
|
if (! empty($creation_sondage_date))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user