X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fxnetlists.php;h=ae991b48f431d06b038583407410766130af880e;hb=28c20b86be8b40cecba0d83080879f81c49e07ad;hp=b4e59872a95af0edca0f54dab775ef446731b74e;hpb=5660032ac785d410f90e3f5b0d6948dc90b0cfea;p=platal.git diff --git a/modules/xnetlists.php b/modules/xnetlists.php index b4e5987..ae991b4 100644 --- a/modules/xnetlists.php +++ b/modules/xnetlists.php @@ -1,6 +1,6 @@ assign('may_update', may_update()); if (count($listes) > 0 && !$globals->asso('has_ml')) { - XDB::execute("UPDATE #groupex#.asso + XDB::execute("UPDATE groups SET flags = CONCAT_WS(',', IF(flags = '', NULL, flags), 'has_ml') WHERE id = {?}", $globals->asso('id')); @@ -142,7 +142,7 @@ class XnetListsModule extends ListsModule S::assert_xsrf_token(); } - if (!Post::has('liste')) { + if (!Post::has('liste') || !Post::v('liste')) { $page->trigError('Le champs « adresse souhaitée Â» est vide.'); return; } @@ -191,7 +191,7 @@ class XnetListsModule extends ListsModule $red . $mdir . '@listes.polytechnique.org'); } - XDB::execute("UPDATE #groupex#.asso + XDB::execute("UPDATE groups SET flags = CONCAT_WS(',', IF(flags = '', NULL, flags), 'has_ml') WHERE id = {?}", $globals->asso('id')); @@ -222,9 +222,9 @@ class XnetListsModule extends ListsModule $not_in_group_ext = array(); $ann = XDB::fetchColumn('SELECT uid - FROM #groupex#.membres + FROM group_members WHERE asso_id = {?}', $globals->asso('id')); - $users = User::getBuildUsersWithUIDs($ann, 'promo,full_name'); + $users = User::getBulkUsersWithUIDs($ann); $not_in_list = array(); foreach ($users as $user) {