From: Raphaël Barrois Date: Wed, 23 Jun 2010 00:34:03 +0000 (+0200) Subject: Fixes promo marketing display ; still a bug X-Git-Tag: xorg/1.0.0~85 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=446fc20dcce46a376c5a4c515c96ed94d9f63d7b;p=platal.git Fixes promo marketing display ; still a bug We have lost the "last_known_email" in the migration, but we need to display it here. Signed-off-by: Raphaël Barrois --- 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} -