X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fxnetlists.php;h=fbdde4e8c90a5ffe4aa4ec30c7860cddd2ed6812;hb=d655dba1a05100bdd309200eb20409e848abf98c;hp=2a9ad7d5bfcc9d0bb5eb67dccc02dba7eaf652a6;hpb=7cdecf882d9716b795faf533cdf6a4427082278a;p=platal.git diff --git a/modules/xnetlists.php b/modules/xnetlists.php index 2a9ad7d..fbdde4e 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'); @@ -229,7 +238,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 +316,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')) {