From 446fc20dcce46a376c5a4c515c96ed94d9f63d7b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Wed, 23 Jun 2010 02:34:03 +0200 Subject: [PATCH] Fixes promo marketing display ; still a bug MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We have lost the "last_known_email" in the migration, but we need to display it here. Signed-off-by: Raphaël Barrois --- classes/user.php | 1 + templates/marketing/promo.tpl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/user.php b/classes/user.php index 33b4de2..c69e234 100644 --- a/classes/user.php +++ b/classes/user.php @@ -379,6 +379,7 @@ class User extends PlUser if (isset($this->last_known_email)) { return; } + // FIXME: We should fetch the last known email as well as the pending registration email (they aren't the same !) $infos = XDB::fetchOneAssoc('SELECT IF (MAX(m.last) > p.relance, MAX(m.last), p.relance) AS last_relance, p.email AS last_known_email FROM register_pending AS p diff --git a/templates/marketing/promo.tpl b/templates/marketing/promo.tpl index d95171d..0cdf5a2 100644 --- a/templates/marketing/promo.tpl +++ b/templates/marketing/promo.tpl @@ -51,7 +51,7 @@ {if $it->lastMarketingRelance() && $it->lastMarketingRelance() != '0000-00-00'} Relance le : {$it->lastMarketingRelance()} - {elseif $it.email} + {elseif $it->lastKnownEmail()} En cours : {$it->lastKnownEmail()} {else} - -- 2.1.4