From: Stéphane Jacob Date: Mon, 29 Dec 2008 16:36:42 +0000 (+0100) Subject: Fixes the reminding interface for people who have not completed their registration. X-Git-Tag: xorg/0.10.1~49^2~33 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=846c391e5f156e86e792cdf4dc743cde738af1de;p=platal.git Fixes the reminding interface for people who have not completed their registration. --- 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);