- foreach (array('', 'owner', 'admin', 'bounces', 'unsubscribe') as $app) {
- $mdir = $app == '' ? '+post' : '+' . $app;
- if (!empty($app)) {
- $app = '-' . $app;
- }
- XDB::execute('INSERT INTO x4dat.virtual (alias,type)
- VALUES({?},{?})', $liste. $app . '@'.$dom, 'list');
- XDB::execute('INSERT INTO x4dat.virtual_redirect (vid,redirect)
- VALUES ({?}, {?})', XDB::insertId(),
- $red . $mdir . '@listes.polytechnique.org');
- }
- pl_redirect('lists/admin/'.$liste);
+ create_list($list, $globals->asso('mail_domain'));
+
+ XDB::execute("UPDATE groups
+ SET flags = CONCAT_WS(',', IF(flags = '', NULL, flags), 'has_ml')
+ WHERE id = {?}",
+ $globals->asso('id'));
+
+ pl_redirect('lists/admin/' . $list);