X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fxnetlists.php;h=299d4cd50ecb70839e914c7ef2072fbd7b696463;hb=1d10d3fd659fa8eb7c663d6bb599bc8bbc0feeb3;hp=2a9ad7d5bfcc9d0bb5eb67dccc02dba7eaf652a6;hpb=7cdecf882d9716b795faf533cdf6a4427082278a;p=platal.git diff --git a/modules/xnetlists.php b/modules/xnetlists.php index 2a9ad7d..299d4cd 100644 --- a/modules/xnetlists.php +++ b/modules/xnetlists.php @@ -70,6 +70,9 @@ class XnetListsModule extends ListsModule { global $globals; + if (!$globals->asso('mail_domain')) { + return PL_NOT_FOUND; + } $this->prepare_client($page); $page->changeTpl('xnetlists/index.tpl'); @@ -113,6 +116,9 @@ class XnetListsModule extends ListsModule { global $globals; + if (!$globals->asso('mail_domain')) { + return PL_NOT_FOUND; + } $this->prepare_client($page); $page->changeTpl('xnetlists/create.tpl'); @@ -163,22 +169,22 @@ class XnetListsModule extends ListsModule XDB::execute('INSERT INTO x4dat.virtual (alias,type) VALUES({?},{?})', $liste.'@'.$dom, 'list'); XDB::execute('INSERT INTO x4dat.virtual_redirect (vid,redirect) - VALUES ({?}, {?})', mysql_insert_id(), + VALUES ({?}, {?})', XDB::insertId(), "$red+post@listes.polytechnique.org"); XDB::execute('INSERT INTO x4dat.virtual (alias,type) VALUES({?},{?})', $liste.'-owner@'.$dom, 'list'); XDB::execute('INSERT INTO x4dat.virtual_redirect (vid,redirect) - VALUES ({?}, {?})', mysql_insert_id(), + VALUES ({?}, {?})', XDB::insertId(), "$red+owner@listes.polytechnique.org"); XDB::execute('INSERT INTO x4dat.virtual (alias,type) VALUES({?},{?})', $liste.'-admin@'.$dom, 'list'); XDB::execute('INSERT INTO x4dat.virtual_redirect (vid,redirect) - VALUES ({?}, {?})', mysql_insert_id(), + VALUES ({?}, {?})', XDB::insertId(), "$red+admin@listes.polytechnique.org"); XDB::execute('INSERT INTO x4dat.virtual (alias,type) VALUES({?},{?})', $liste.'-bounces@'.$dom, 'list'); XDB::execute('INSERT INTO x4dat.virtual_redirect (vid,redirect) - VALUES ({?}, {?})', mysql_insert_id(), + VALUES ({?}, {?})', XDB::insertId(), "$red+bounces@listes.polytechnique.org"); pl_redirect('lists/admin/'.$liste); @@ -188,6 +194,9 @@ class XnetListsModule extends ListsModule { global $globals; + if (!$globals->asso('mail_domain')) { + return PL_NOT_FOUND; + } $this->prepare_client($page); $page->changeTpl('xnetlists/sync.tpl'); @@ -214,7 +223,8 @@ class XnetListsModule extends ListsModule FROM groupex.membres AS m 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 = {?}", $globals->asso('id')); + WHERE m.asso_id = {?} + ORDER BY promo, nom, prenom", $globals->asso('id')); $not_in_list = array(); @@ -229,7 +239,9 @@ class XnetListsModule extends ListsModule function handler_aadmin(&$page, $lfull = null) { - if (is_null($lfull)) { + global $globals; + + if (!$globals->asso('mail_domain') || is_null($lfull)) { return PL_NOT_FOUND; } @@ -305,6 +317,9 @@ class XnetListsModule extends ListsModule { global $globals; + if (!$globals->asso('mail_domain')) { + return PL_NOT_FOUND; + } new_groupadmin_page('xnet/groupe/alias-create.tpl'); if (!Post::has('submit')) {