From 48f28a1ab8bf0982208d1fa6d796c7c52a9023de Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 10 Apr 2011 23:02:54 +0000 Subject: [PATCH] Fix: Date conversion --- htdocs/public/members/new.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index a92958ad834..52e16bb4ec6 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -1,7 +1,7 @@ * Copyright (C) 2001-2002 Jean-Louis Bergamo - * Copyright (C) 2006-2009 Laurent Destailleur + * Copyright (C) 2006-2011 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -144,13 +144,14 @@ if ($_POST["action"] == 'add') $adh->email = $_POST["email"]; $adh->login = $login; $adh->pass = $_POST["pass1"]; - $adh->naiss = $_POST["naiss"]; $adh->photo = $_POST["photo"]; $adh->note = $_POST["note"]; $adh->pays = $_POST["pays"]; $adh->typeid = $_POST["type"]; $adh->note = $_POST["comment"]; $adh->morphy = $_POST["morphy"]; + if (preg_match('/-/',$_POST["naiss"])) $adh->naiss = dol_stringtotime($_POST["naiss"],1); + else $adh->naiss = $_POST["naiss"]; foreach($_POST as $key => $value){ if (preg_match("/^options_/",$key)){