mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
End date of the survey was altered when creating a new column in date poll format
This commit is contained in:
parent
45aa6767e0
commit
aa25d2cb81
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user