From 846c391e5f156e86e792cdf4dc743cde738af1de Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Mon, 29 Dec 2008 17:36:42 +0100 Subject: [PATCH] Fixes the reminding interface for people who have not completed their registration. --- include/marketing.inc.php | 6 ++++-- modules/marketing.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/marketing.inc.php b/include/marketing.inc.php index d488843..de95b4c 100644 --- a/include/marketing.inc.php +++ b/include/marketing.inc.php @@ -197,7 +197,9 @@ class Marketing $res = XDB::query("SELECT r.date, u.promo, u.nom, u.prenom, r.email, r.bestalias FROM register_pending AS r INNER JOIN auth_user_md5 AS u ON u.user_id = r.uid - WHERE hash!='INSCRIT' AND uid={?} AND TO_DAYS(relance) < TO_DAYS(NOW())", $uid); + WHERE hash != 'INSCRIT' AND uid = {?} AND + (TO_DAYS(relance) IS NULL OR TO_DAYS(relance) < TO_DAYS(NOW()))", + $uid); if (!list($date, $promo, $nom, $prenom, $email, $alias) = $res->fetchOneRow()) { return false; } @@ -220,7 +222,7 @@ class Marketing $mymail->send(); XDB::execute('UPDATE register_pending SET hash={?}, password={?}, relance=NOW() - WHERE uid={?}', $hash, $pass_encrypted, $uid); + WHERE uid={?}', $hash, $pass_encrypted, $uid); return "$prenom $nom ($promo)"; } } diff --git a/modules/marketing.php b/modules/marketing.php index f6ac4fb..b620e78 100644 --- a/modules/marketing.php +++ b/modules/marketing.php @@ -346,7 +346,7 @@ class MarketingModule extends PLModule $sent = Array(); foreach (array_keys($_POST['relance']) as $uid) { if ($tmp = Marketing::relance($uid, $nbdix)) { - $sent[] = $tmp.' a été relancé'; + $sent[] = $tmp . ' a été relancé.'; } } $page->assign('sent', $sent); -- 2.1.4