From 11f2c0a75264106fe46a897453b00d375fabf027 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Wed, 23 Jun 2010 02:46:25 +0200 Subject: [PATCH] Fix display of pending marketings (Closes #1117) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- modules/marketing.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/marketing.php b/modules/marketing.php index d382124..d5f9ed8 100644 --- a/modules/marketing.php +++ b/modules/marketing.php @@ -301,11 +301,13 @@ class MarketingModule extends PLModule if (!is_null($promo)) { - $it = XDB::iterator('SELECT m.uid, m.email + $it = XDB::iterator('SELECT m.uid, m.email, s.alias AS forlife FROM register_marketing AS m INNER JOIN account_profiles AS ap ON (m.uid = ap.uid AND FIND_IN_SET(\'owner\', ap.perms)) INNER JOIN profile_display AS pd ON (pd.pid = ap.pid) - WHERE pd.promo = {?}', $promo); + LEFT JOIN aliases AS s ON (m.sender = s.uid AND s.type = \'a_vie\') + WHERE pd.promo = {?} + ORDER BY pd.sort_name', $promo); $page->assign('addr', $it); } } -- 2.1.4