From aa25d2cb8123df5ad6ba855286abfe23ab6fa573 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= <marcosgdf@gmail.com> Date: Sun, 5 Jan 2014 21:23:00 +0100 Subject: [PATCH] End date of the survey was altered when creating a new column in date poll format --- htdocs/opensurvey/results.php | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index 769eb3e2d51..365ea3cd9e3 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -260,19 +260,8 @@ if (isset($_POST["ajoutercolonne"]) && ($object->format == "D")) dol_syslog("sql=".$sql); $resql = $db->query($sql); if (! $resql) dol_print_error($db); - - if ($nouvelledate > strtotime($object->date_fin)) - { - $date_fin=$nouvelledate+200000; - $sql = 'UPDATE '.MAIN_DB_PREFIX.'opensurvey_sondage'; - $sql.= " SET date_fin = '".$db->escape($date_fin)."'"; - $sql.= " WHERE id_sondage = '".$db->escape($numsondage)."'"; - dol_syslog("sql=".$sql); - $resql = $db->query($sql); - if (! $resql) dol_print_error($db); - else { - header('Location: results.php?id='.$object->id_sondage); - } + else { + header('Location: results.php?id='.$object->id_sondage); } } -- GitLab