X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fxnetevents%2Fxnetevents.inc.php;h=b1822da5f75974915ab3b5eb2b5360a37968acbe;hb=730a173a333507926e0029d8a96c3a26b55756e4;hp=a9ca09ccd5c83091d00a023bc2b865ba796ddca4;hpb=d0327f6de73e81c4bcc656471ca4161e4f1e1e1b;p=platal.git diff --git a/modules/xnetevents/xnetevents.inc.php b/modules/xnetevents/xnetevents.inc.php index a9ca09c..b1822da 100644 --- a/modules/xnetevents/xnetevents.inc.php +++ b/modules/xnetevents/xnetevents.inc.php @@ -250,7 +250,7 @@ function subscribe_lists_event($participate, $uid, $evt) } // }}} -function event_change_shortname(&$page, $old, $new) +function event_change_shortname(&$page, $eid, $old, $new) { global $globals; @@ -307,7 +307,7 @@ function event_change_shortname(&$page, $old, $new) LEFT JOIN groupex.membres AS m ON (ep.uid = m.uid) LEFT JOIN auth_user_md5 AS u ON (u.user_id = ep.uid) LEFT JOIN aliases AS a ON (a.id = ep.uid AND a.type = 'a_vie') - WHERE ep.eid = {?} + WHERE ep.eid = {?} AND ep.nb > 0 GROUP BY ep.uid)", $lastid, '@'.$globals->mail->domain, $eid); @@ -318,12 +318,12 @@ function event_change_shortname(&$page, $old, $new) XDB::execute("INSERT INTO virtual_redirect ( SELECT {?} AS vid, IF(u.nom IS NULL, m.email, CONCAT(a.alias, {?})) AS redirect FROM groupex.membres AS m - LEFT JOIN groupex.evenements_participants AS ep ON (ep.uid = m.uid) + LEFT JOIN groupex.evenements_participants AS ep ON (ep.uid = m.uid AND ep.eid = {?}) 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 = {?} AND ep.uid IS NULL GROUP BY m.uid)", - $lastid, "@".$globals->mail->domain, $globals->asso('id')); + $lastid, "@".$globals->mail->domain, $eid, $globals->asso('id')); return $new; }