Fix #453: Feed promotion groups with everybody and ignore pending users in group...
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Fri, 15 Sep 2006 12:31:27 +0000 (12:31 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Fri, 15 Sep 2006 12:31:27 +0000 (12:31 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@838 839d8a87-29fc-0310-9880-83ba4fa771e5

ChangeLog
include/xnet/mail.inc.php
modules/xnetgrp.php
upgrade/0.9.11/03_xnet.sql

index 03109b8..8840b88 100644 (file)
--- 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:
 
index 43b87bd..7d3a815 100644 (file)
@@ -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();
     }
 
index ee90d08..a3b54f1 100644 (file)
@@ -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);
 
index a044a85..6d269c5 100644 (file)
@@ -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