From: Olivier Le Floch Date: Wed, 24 Sep 2008 19:15:40 +0000 (+0200) Subject: In the marketing administration page, fix display of marketings done by the mass... X-Git-Tag: xorg/0.10.0~98 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=fa61fc66700e63568651d738532a940231328e79;p=platal.git 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. --- 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:"-"}