From 16714428d1c0546b0710285dd03f3899faaf5f5a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Tue, 2 Nov 2010 16:42:46 +0100 Subject: [PATCH] Fix promo inscription MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- modules/admin.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/admin.php b/modules/admin.php index 6b5fc43..99e210d 100644 --- a/modules/admin.php +++ b/modules/admin.php @@ -756,7 +756,7 @@ class AdminModule extends PLModule return false; } - array_map('trim', $infos); + $infos = array_map('trim', $infos); $hrid = self::getHrid($infos[1], $infos[0], $promo); $res1 = XDB::query('SELECT COUNT(*) FROM accounts @@ -787,7 +787,9 @@ class AdminModule extends PLModule private static function formatBirthDate($birthDate) { - return date("Y-m-d", strtotime($birthDate)); + // strtotime believes dd/mm/yyyy to be an US date (i.e mm/dd/yyyy), and + // dd-mm-yyyy to be a normal date (i.e dd-mm-yyyy)... + return date("Y-m-d", strtotime(str_replace('/', '-', $birthDate))); } function handler_add_accounts(&$page, $action = null, $promo = null) -- 2.1.4