From fa61fc66700e63568651d738532a940231328e79 Mon Sep 17 00:00:00 2001 From: Olivier Le Floch Date: Wed, 24 Sep 2008 21:15:40 +0200 Subject: [PATCH] In the marketing administration page, fix display of marketings done by the mass-marketing script, which does not define a sender - The query uses a LEFT JOIN in case sender is not a valid uid, - If the sender is not found, then the template does not fill in his name in the output table. --- modules/marketing.php | 2 +- templates/marketing/private.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/marketing.php b/modules/marketing.php index 9507cf5..eb0778d 100644 --- a/modules/marketing.php +++ b/modules/marketing.php @@ -154,7 +154,7 @@ class MarketingModule extends PLModule $res = XDB::iterator( "SELECT r.*, a.alias FROM register_marketing AS r - INNER JOIN aliases AS a ON (r.sender=a.id AND a.type = 'a_vie') + LEFT JOIN aliases AS a ON (r.sender=a.id AND a.type = 'a_vie') WHERE uid={?} ORDER BY date", $uid); $page->assign('addr', $res); diff --git a/templates/marketing/private.tpl b/templates/marketing/private.tpl index aee32ff..85de8e3 100644 --- a/templates/marketing/private.tpl +++ b/templates/marketing/private.tpl @@ -64,7 +64,7 @@ sa dernière relance date du {$relance|date_format} {iterate from=$addr item=a} {$a.email} - {$a.alias} {if $a.type eq user}(*){/if} + {if $a.alias}{$a.alias} {if $a.type eq user}(*){/if}{/if} {$a.date|date_format|default:'-'} {$a.last|date_format|default:'-'} {$a.nb|default:"-"} -- 2.1.4