From 88198bd8b9c75bf3ed64b3c277f234cbbb4e16e8 Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Fri, 15 Sep 2006 12:31:27 +0000 Subject: [PATCH] Fix #453: Feed promotion groups with everybody and ignore pending users in group display. git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@838 839d8a87-29fc-0310-9880-83ba4fa771e5 --- ChangeLog | 1 + include/xnet/mail.inc.php | 3 ++- modules/xnetgrp.php | 1 + upgrade/0.9.11/03_xnet.sql | 5 +++++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 03109b8..8840b88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -113,6 +113,7 @@ Bug/Wish: - #384: Substitution of non-X's names in mail from web interface. -FRU - #426: Add an identification header in mails. -FRU - #439: Move doc to the wiki -Car/FRU + - #453: Add members in promotion groups -FRU From 0.9.10 Branch: diff --git a/include/xnet/mail.inc.php b/include/xnet/mail.inc.php index 43b87bd..7d3a815 100644 --- a/include/xnet/mail.inc.php +++ b/include/xnet/mail.inc.php @@ -38,7 +38,8 @@ function get_all_redirects($membres, $mls, &$client) FROM groupex.membres AS m LEFT JOIN auth_user_md5 AS u ON (m.uid=u.user_id AND m.uid<50000) LEFT JOIN aliases AS a ON (a.id=u.user_id and a.type="a_vie") - WHERE asso_id = {?}', $globals->asso('id')); + WHERE asso_id = {?} + AND (m.email <> "" OR u.perms <> "pending")', $globals->asso('id')); $tos = $res->fetchAllAssoc(); } diff --git a/modules/xnetgrp.php b/modules/xnetgrp.php index ee90d08..a3b54f1 100644 --- a/modules/xnetgrp.php +++ b/modules/xnetgrp.php @@ -317,6 +317,7 @@ class XnetGrpModule extends PLModule LEFT JOIN auth_user_md5 AS u ON ( u.user_id = m.uid ) LEFT JOIN aliases AS a ON ( a.id = m.uid AND a.type='a_vie' ) WHERE m.asso_id = {?} $ini + AND (m.origine = 'ext' OR u.perms != 'pending') ORDER BY $tri LIMIT {?},{?}", $globals->asso('id'), $ofs*NB_PER_PAGE, NB_PER_PAGE); diff --git a/upgrade/0.9.11/03_xnet.sql b/upgrade/0.9.11/03_xnet.sql index a044a85..6d269c5 100644 --- a/upgrade/0.9.11/03_xnet.sql +++ b/upgrade/0.9.11/03_xnet.sql @@ -2,5 +2,10 @@ use groupex alter table evenements drop column advertise; alter table evenements drop column membres_only; alter table membres add column sexe bool default null; + +INSERT IGNORE INTO membres (uid, asso_id) + SELECT u.user_id AS uid, g.id AS asso_id + FROM x4dat.auth_user_md5 AS u + INNER JOIN asso AS g ON (g.diminutif LIKE u.promo); use x4dat -- 2.1.4