From 1490093c909c086ce8eba3c0f5c24b62ef20cfb3 Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Mon, 2 Apr 2007 09:34:27 +0000 Subject: [PATCH] Use 'changeTpl' for xnet pages and use handler permission instead of page restriction Code cleaning git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1654 839d8a87-29fc-0310-9880-83ba4fa771e5 --- classes/platalpage.php | 7 +++-- classes/plset.php | 6 +--- include/xnet.inc.php | 72 ++++++-------------------------------------- include/xnet/page.inc.php | 16 ++++++++++ include/xnet/session.inc.php | 3 +- include/xorg.inc.php | 29 +++--------------- modules/core.php | 12 ++------ modules/lists.php | 32 +++++++------------- modules/payment.php | 12 +++----- modules/xnet.php | 2 +- modules/xnetevents.php | 25 ++++++--------- modules/xnetgrp.php | 57 +++++++++-------------------------- modules/xnetlists.php | 14 +++------ 13 files changed, 85 insertions(+), 202 deletions(-) diff --git a/classes/platalpage.php b/classes/platalpage.php index b0a561b..2550d62 100644 --- a/classes/platalpage.php +++ b/classes/platalpage.php @@ -21,7 +21,7 @@ require_once 'smarty/libs/Smarty.class.php'; -class PlatalPage extends Smarty +abstract class PlatalPage extends Smarty { private $_page_type; private $_tpl; @@ -47,8 +47,7 @@ class PlatalPage extends Smarty $this->compile_check = !empty($globals->debug); - $this->_page_type = $type; - $this->_tpl = $tpl; + $this->changeTpl($tpl, $type); $this->_errors = array(); $this->_jsonVars = array(); $this->_failure = false; @@ -164,6 +163,8 @@ class PlatalPage extends Smarty exit; } + abstract public function run(); + // }}} // {{{ function nb_errs() diff --git a/classes/plset.php b/classes/plset.php index 9ca8d57..d2267d0 100644 --- a/classes/plset.php +++ b/classes/plset.php @@ -138,11 +138,7 @@ class PlSet if (is_null($view)) { return false; } - if (empty($GLOBALS['IS_XNET_SITE'])) { - $page->changeTpl('core/plset.tpl'); - } else { - new_group_open_page('core/plset.tpl'); - } + $page->changeTpl('core/plset.tpl'); $page->assign('plset_base', $baseurl); $page->assign('plset_mods', $this->mods); $page->assign('plset_mod', $this->mod); diff --git a/include/xnet.inc.php b/include/xnet.inc.php index d3c169b..d2104e0 100644 --- a/include/xnet.inc.php +++ b/include/xnet.inc.php @@ -27,82 +27,30 @@ XnetSession::init(); // {{{ function new_skinned_page() -function new_page($tpl_name, $type = SKINNED) +function new_skinned_page($tpl_name, $refuse_access = false) { global $page, $globals; require_once("xnet/page.inc.php"); - $page = new XnetPage($tpl_name, $type); - $page->assign('xorg_tpl', $tpl_name); - $page->assign('is_logged', S::logged()); -} - -function new_skinned_page($tpl_name) -{ - return new_page($tpl_name); -} - -// }}} -// {{{ function new_group_open_page() - -function new_group_open_page($tpl_name, $refuse_access = false) -{ - global $page, $globals; - - new_page($tpl_name); - - $page->assign('asso', $globals->asso()); - $page->setType($globals->asso('cat')); - $page->assign('is_admin', may_update()); - $page->assign('is_member', is_member()); - + if (!$page instanceof XnetPage) { + $page = new XnetPage($tpl_name, $type); + } else { + $page->changeTpl($tpl_name, $type); + } if ($refuse_access) { $page->kill("Vous n'avez pas les droits suffisants pour accéder à cette page"); } } // }}} -// {{{ function new_group_page() - -function new_group_page($tpl_name) -{ - new_group_open_page($tpl_name, !is_member() && !S::has_perms()); -} - -// }}} -// {{{ function new_groupadmin_page() - -function new_groupadmin_page($tpl_name) -{ - new_group_open_page($tpl_name, !may_update()); -} - -// }}} // {{{ function new_annu_page() function new_annu_page($tpl_name) { global $globals; - new_group_open_page($tpl_name, - !may_update() - && (!is_member() || $globals->asso('pub') != 'public') - && $globals->asso('cat') != 'Promotions'); -} - -// }}} -// {{{ function new_admin_page() - -function new_admin_page($tpl_name) -{ - global $page, $globals; - - new_page($tpl_name); - - check_perms(); - - if ($globals->asso('cat')) { - $page->assign('asso', $globals->asso()); - $page->setType($globals->asso('cat')); - } + new_skinned_page($tpl_name, + !may_update() + && (!is_member() || $globals->asso('pub') != 'public') + && $globals->asso('cat') != 'Promotions'); } // }}} diff --git a/include/xnet/page.inc.php b/include/xnet/page.inc.php index 167693e..0bbfbad 100644 --- a/include/xnet/page.inc.php +++ b/include/xnet/page.inc.php @@ -50,6 +50,22 @@ class XnetPage extends PlatalPage } // }}} + // {{{ function changeTpl() + + public function changeTpl($tpl, $type = SKINNED) + { + global $globals; + parent::changeTpl($tpl, $type); + $this->assign('is_logged', S::logged()); + if ($globals->asso('id')) { + $this->assign('asso', $globals->asso()); + $this->setType($globals->asso('cat')); + $this->assign('is_admin', may_update()); + $this->assign('is_member', is_member()); + } + } + + // }}} // {{{ function setType public function setType($type) diff --git a/include/xnet/session.inc.php b/include/xnet/session.inc.php index d798261..f319d80 100644 --- a/include/xnet/session.inc.php +++ b/include/xnet/session.inc.php @@ -23,7 +23,8 @@ class XnetSession { // {{{ function init - public static function init() { + public static function init() + { global $globals; S::init(); diff --git a/include/xorg.inc.php b/include/xorg.inc.php index 5aea187..6aa6cbf 100644 --- a/include/xorg.inc.php +++ b/include/xorg.inc.php @@ -47,36 +47,17 @@ class XorgPage extends PlatalPage } } -// }}} +// {{{ function new_skinned_page() -function _new_page($type, $tpl_name, $admin=false) +function new_skinned_page($tpl_name) { global $page; - if (!empty($admin)) { - $page = new XorgAdmin($tpl_name, $type); - } else { + if (!$page instanceof XorgPage) { $page = new XorgPage($tpl_name, $type); + } else { + $page->changeTpl($tpl_name, $type); } - - $page->assign('xorg_tpl', $tpl_name); -} - -// {{{ function new_skinned_page() - -function new_skinned_page($tpl_name) -{ - _new_page(SKINNED, $tpl_name); -} - -// }}} -// {{{ function new_admin_page() - -function new_admin_page($tpl_name) -{ - _new_page(SKINNED, $tpl_name, true); } -// }}} - // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?> diff --git a/modules/core.php b/modules/core.php index ed58bac..cbc40f0 100644 --- a/modules/core.php +++ b/modules/core.php @@ -49,22 +49,14 @@ class CoreModule extends PLModule { global $globals; header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden'); - if (!empty($GLOBALS['IS_XNET_SITE']) && $globals->asso()) { - new_skinned_page('core/403.tpl'); - } else { - $page->changeTpl('core/403.tpl'); - } + $page->changeTpl('core/403.tpl'); } function handler_404(&$page) { global $globals, $platal; header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found'); - if (!empty($GLOBALS['IS_XNET_SITE']) && $globals->asso()) { - new_group_open_page('core/404.tpl'); - } else { - $page->changeTpl('core/404.tpl'); - } + $page->changeTpl('core/404.tpl'); $page->assign('near', $platal->near_hook()); } diff --git a/modules/lists.php b/modules/lists.php index c6fb9dc..8dbf769 100644 --- a/modules/lists.php +++ b/modules/lists.php @@ -225,16 +225,6 @@ class ListsModule extends PLModule } } - function changeTpl($tpl) - { - if (!empty($GLOBALS['IS_XNET_SITE'])) { - new_group_open_page($tpl); - } else { - global $page; - $page->changeTpl($tpl); - } - } - function handler_members(&$page, $liste = null) { if (is_null($liste)) { @@ -243,7 +233,7 @@ class ListsModule extends PLModule $this->prepare_client($page); - $this->changeTpl('lists/members.tpl'); + $page->changeTpl('lists/members.tpl'); if (Get::has('del')) { $this->client->unsubscribe($liste); @@ -315,7 +305,7 @@ class ListsModule extends PLModule $this->prepare_client($page); - $this->changeTpl('lists/trombi.tpl'); + $page->changeTpl('lists/trombi.tpl'); if (Get::has('del')) { $this->client->unsubscribe($liste); @@ -351,7 +341,7 @@ class ListsModule extends PLModule $domain = $this->prepare_client($page); - $this->changeTpl('lists/archives.tpl'); + $page->changeTpl('lists/archives.tpl'); if (list($det) = $this->client->get_members($liste)) { if (substr($liste,0,5) != 'promo' && ($det['ins'] || $det['priv']) @@ -451,7 +441,7 @@ class ListsModule extends PLModule $domain = $this->prepare_client($page); - $this->changeTpl('lists/moderate.tpl'); + $page->changeTpl('lists/moderate.tpl'); $page->register_modifier('hdc', 'list_header_decode'); @@ -513,7 +503,7 @@ class ListsModule extends PLModule if (list($subs,$mails) = $this->client->get_pending_ops($liste)) { foreach($subs as $user) { if ($user['id'] == Env::v('sid')) { - $this->changeTpl('lists/moderate_sub.tpl'); + $page->changeTpl('lists/moderate_sub.tpl'); $page->assign('del_user', $user); return; } @@ -559,7 +549,7 @@ class ListsModule extends PLModule $domain = $this->prepare_client($page); - $this->changeTpl('lists/admin.tpl'); + $page->changeTpl('lists/admin.tpl'); if (Env::has('send_mark')) { $actions = Env::v('mk_action'); @@ -661,7 +651,7 @@ class ListsModule extends PLModule $this->prepare_client($page); - $this->changeTpl('lists/options.tpl'); + $page->changeTpl('lists/options.tpl'); if (Post::has('submit')) { $values = $_POST; @@ -723,7 +713,7 @@ class ListsModule extends PLModule $type = 'list'; } - $this->changeTpl('lists/delete.tpl'); + $page->changeTpl('lists/delete.tpl'); if (Post::v('valid') == 'OUI') { if ($this->client->delete_list($liste, Post::b('del_archive'))) { foreach (array('', '-owner', '-admin', '-bounces') as $app) { @@ -754,7 +744,7 @@ class ListsModule extends PLModule $this->prepare_client($page); - $this->changeTpl('lists/soptions.tpl'); + $page->changeTpl('lists/soptions.tpl'); if (Post::has('submit')) { $values = $_POST; @@ -781,7 +771,7 @@ class ListsModule extends PLModule $this->prepare_client($page); - $this->changeTpl('lists/check.tpl'); + $page->changeTpl('lists/check.tpl'); if (Post::has('correct')) { $this->client->check_options($liste, true); @@ -796,7 +786,7 @@ class ListsModule extends PLModule } function handler_admin_all(&$page) { - $this->changeTpl('lists/admin_all.tpl'); + $page->changeTpl('lists/admin_all.tpl'); $page->assign('xorg_title','Polytechnique.org - Administration - Mailing lists'); $client = new MMList(S::v('uid'), S::v('password')); diff --git a/modules/payment.php b/modules/payment.php index f3f9d3e..10587b6 100644 --- a/modules/payment.php +++ b/modules/payment.php @@ -80,8 +80,8 @@ class PaymentModule extends PLModule 'payment' => $this->make_hook('payment', AUTH_MDP), 'payment/cyber_return' => $this->make_hook('cyber_return', AUTH_PUBLIC), 'payment/paypal_return' => $this->make_hook('paypal_return', AUTH_PUBLIC), - '%grp/paiement' => $this->make_hook('xnet_payment', AUTH_MDP), - '%grp/payment' => $this->make_hook('xnet_payment', AUTH_MDP), + '%grp/paiement' => $this->make_hook('xnet_payment', AUTH_MDP, 'groupmember'), + '%grp/payment' => $this->make_hook('xnet_payment', AUTH_MDP, 'groupmember'), '%grp/payment/cyber_return' => $this->make_hook('cyber_return', AUTH_PUBLIC), '%grp/payment/paypal_return' => $this->make_hook('paypal_return', AUTH_PUBLIC), 'admin/payments' => $this->make_hook('admin', AUTH_MDP, 'admin'), @@ -107,11 +107,9 @@ class PaymentModule extends PLModule if (!$res->numRows()) { return PL_FORBIDDEN; } - new_group_page('payment/index.tpl'); - } else { - $page->changeTpl('payment/index.tpl'); - $page->assign('xorg_title','Polytechnique.org - Télépaiements'); } + $page->changeTpl('payment/index.tpl'); + $page->assign('xorg_title','Polytechnique.org - Télépaiements'); // initialisation $op = Env::v('op', 'select'); @@ -347,7 +345,7 @@ class PaymentModule extends PLModule if (!is_null($pid)) { return $this->handler_payment($page, $pid); } - new_group_page('payment/xnet.tpl'); + $page->changeTpl('payment/xnet.tpl'); $res = XDB::query( "SELECT id, text, url diff --git a/modules/xnet.php b/modules/xnet.php index 1f30778..4fceb21 100644 --- a/modules/xnet.php +++ b/modules/xnet.php @@ -72,7 +72,7 @@ class XnetModule extends PLModule function handler_admin(&$page) { - new_admin_page('xnet/admin.tpl'); + $page->changeTpl('xnet/admin.tpl'); if (Get::has('del')) { $res = XDB::query('SELECT id, nom, mail_domain diff --git a/modules/xnetevents.php b/modules/xnetevents.php index 9c93130..08478fe 100644 --- a/modules/xnetevents.php +++ b/modules/xnetevents.php @@ -31,7 +31,7 @@ class XnetEventsModule extends PLModule '%grp/events/csv' => $this->make_hook('csv', AUTH_MDP), '%grp/events/ical' => $this->make_hook('ical', AUTH_MDP), '%grp/events/edit' => $this->make_hook('edit', AUTH_MDP, 'groupadmin'), - '%grp/events/admin' => $this->make_hook('admin', AUTH_MDP), + '%grp/events/admin' => $this->make_hook('admin', AUTH_MDP, 'groupmember'), ); } @@ -39,15 +39,10 @@ class XnetEventsModule extends PLModule { global $globals; - if ($archive == 'archive') { - $archive = true; - new_groupadmin_page('xnetevents/index.tpl'); - } else { - $archive = false; - new_group_open_page('xnetevents/index.tpl'); - } - + $page->changeTpl('xnetevents/index.tpl'); $action = null; + $archive = ($archive == 'archive' && may_update()); + if (Post::has('del')) { $action = 'del'; $eid = Post::v('del'); @@ -177,8 +172,7 @@ class XnetEventsModule extends PLModule function handler_sub(&$page, $eid = null) { require_once dirname(__FILE__).'/xnetevents/xnetevents.inc.php'; - - new_group_open_page('xnetevents/subscribe.tpl'); + $page->changeTpl('xnetevents/subscribe.tpl'); $evt = get_event_detail($eid); if (!$evt) { @@ -345,7 +339,7 @@ class XnetEventsModule extends PLModule } } - new_groupadmin_page('xnetevents/edit.tpl'); + $page->changeTpl('xnetevents/edit.tpl'); $moments = range(1, 4); $error = false; @@ -509,10 +503,9 @@ class XnetEventsModule extends PLModule return PL_NOT_FOUND; } - if ($evt['show_participants']) { - new_group_page('xnetevents/admin.tpl'); - } else { - new_groupadmin_page('xnetevents/admin.tpl'); + $page->changeTpl('xnetevents/admin.tpl'); + if (!$evt['show_participants'] && !may_update()) { + return PL_FORBIDDEN; } if (may_update() && Post::v('adm')) { diff --git a/modules/xnetgrp.php b/modules/xnetgrp.php index 9fcfd9f..bbb557a 100644 --- a/modules/xnetgrp.php +++ b/modules/xnetgrp.php @@ -79,12 +79,12 @@ class XnetGrpModule extends PLModule '%grp/site' => $this->make_hook('site', AUTH_PUBLIC), '%grp/edit' => $this->make_hook('edit', AUTH_MDP, 'groupadmin'), '%grp/mail' => $this->make_hook('mail', AUTH_MDP, 'groupadmin'), - '%grp/forum' => $this->make_hook('forum', AUTH_MDP), + '%grp/forum' => $this->make_hook('forum', AUTH_MDP, 'groupmember'), '%grp/annuaire' => $this->make_hook('annuaire', AUTH_MDP), '%grp/annuaire/vcard' => $this->make_hook('vcard', AUTH_MDP), '%grp/trombi' => $this->make_hook('trombi', AUTH_MDP), '%grp/subscribe' => $this->make_hook('subscribe', AUTH_MDP), - '%grp/unsubscribe' => $this->make_hook('unsubscribe', AUTH_MDP), + '%grp/unsubscribe' => $this->make_hook('unsubscribe', AUTH_MDP, 'groupmember'), '%grp/change_rights' => $this->make_hook('change_rights', AUTH_MDP), @@ -114,8 +114,7 @@ class XnetGrpModule extends PLModule if (!is_null($arg)) { return PL_NOT_FOUND; } - - new_group_open_page('xnetgrp/asso.tpl'); + $page->changeTpl('xnetgrp/asso.tpl'); if (S::logged()) { if (Env::has('read')) { @@ -220,8 +219,7 @@ class XnetGrpModule extends PLModule function handler_edit(&$page) { global $globals; - - new_groupadmin_page('xnetgrp/edit.tpl'); + $page->changeTpl('xnetgrp/edit.tpl'); if (Post::has('submit')) { if (S::has_perms()) { @@ -286,7 +284,7 @@ class XnetGrpModule extends PLModule { global $globals; - new_groupadmin_page('xnetgrp/mail.tpl'); + $page->changeTpl('xnetgrp/mail.tpl'); $mmlist = new MMList(S::v('uid'), S::v('password'), $globals->asso('mail_domain')); $page->assign('listes', $mmlist->get_lists()); @@ -315,7 +313,7 @@ class XnetGrpModule extends PLModule function handler_forum(&$page, $group = null, $artid = null) { global $globals; - new_group_page('xnetgrp/forum.tpl'); + $page->changeTpl('xnetgrp/forum.tpl'); if (!$globals->asso('forum')) { return PL_NOT_FOUND; } @@ -434,31 +432,6 @@ class XnetGrpModule extends PLModule $view->addMod('trombi', 'Trombinoscope', true, array('with_admin' => false, 'with_promo' => true)); $view->apply('trombi', $page, 'trombi', $action, $subaction); } - - function _trombi_getlist($offset, $limit) - { - global $globals; - $where = "WHERE m.asso_id= '".addslashes($globals->asso('id'))."'"; - - $res = XDB::query( - "SELECT COUNT(*) - FROM auth_user_md5 AS u - RIGHT JOIN photo AS p ON u.user_id=p.uid - INNER JOIN groupex.membres AS m ON (m.uid = u.user_id) - $where"); - $pnb = $res->fetchOneCell(); - - $res = XDB::query("SELECT promo, user_id, a.alias AS forlife, - IF (nom_usage='', u.nom, nom_usage) AS nom, u.prenom - FROM photo AS p - INNER JOIN auth_user_md5 AS u ON u.user_id=p.uid - INNER JOIN aliases AS a ON ( u.user_id=a.id AND a.type='a_vie' ) - INNER JOIN groupex.membres AS m ON (m.uid = u.user_id) - $where - ORDER BY promo, u.nom, u.prenom LIMIT {?}, {?}", $offset*$limit, $limit); - - return array($pnb, $res->fetchAllAssoc()); - } function handler_vcard(&$page, $photos = null) { @@ -478,8 +451,7 @@ class XnetGrpModule extends PLModule function handler_subscribe(&$page, $u = null) { global $globals; - - new_group_open_page('xnetgrp/inscrire.tpl'); + $page->changeTpl('xnetgrp/inscrire.tpl'); if (!$globals->asso('inscriptible')) $page->kill("Il n'est pas possible de s'inscire en ligne à ce " @@ -629,8 +601,7 @@ class XnetGrpModule extends PLModule global $globals; require_once dirname(__FILE__) . '/xnetgrp/mail.inc.php'; - - new_groupadmin_page('xnetgrp/annuaire-admin.tpl'); + $page->changeTpl('xnetgrp/annuaire-admin.tpl'); $mmlist = new MMList(S::v('uid'), S::v('password'), $globals->asso('mail_domain')); $lists = $mmlist->get_lists(); @@ -675,7 +646,7 @@ class XnetGrpModule extends PLModule { global $globals; - new_groupadmin_page('xnetgrp/membres-add.tpl'); + $page->changeTpl('xnetgrp/membres-add.tpl'); $page->addJsLink('ajax.js'); if (is_null($email)) { @@ -816,7 +787,7 @@ class XnetGrpModule extends PLModule function handler_unsubscribe(&$page) { - new_group_page('xnetgrp/membres-del.tpl'); + $page->changeTpl('xnetgrp/membres-del.tpl'); $user = get_infos(S::v('forlife')); if (empty($user)) { return PL_NOT_FOUND; @@ -838,7 +809,7 @@ class XnetGrpModule extends PLModule function handler_admin_member_del(&$page, $user = null) { - new_groupadmin_page('xnetgrp/membres-del.tpl'); + $page->changeTpl('xnetgrp/membres-del.tpl'); $user = get_infos($user); if (empty($user)) { return PL_NOT_FOUND; @@ -860,7 +831,7 @@ class XnetGrpModule extends PLModule { global $globals; - new_groupadmin_page('xnetgrp/membres-edit.tpl'); + $page->changeTpl('xnetgrp/membres-edit.tpl'); $user = get_infos($user); if (empty($user)) { @@ -987,7 +958,7 @@ class XnetGrpModule extends PLModule function handler_edit_announce(&$page, $aid = null) { global $globals, $platal; - new_groupadmin_page('xnetgrp/announce-edit.tpl'); + $page->changeTpl('xnetgrp/announce-edit.tpl'); $page->register_modifier('wiki_to_html', array('MiniWiki','WikiToHTML')); $page->assign('new', is_null($aid)); $art = array(); @@ -1120,7 +1091,7 @@ class XnetGrpModule extends PLModule function handler_admin_announce(&$page) { global $globals; - new_groupadmin_page('xnetgrp/announce-admin.tpl'); + $page->changeTpl('xnetgrp/announce-admin.tpl'); if (Env::has('del')) { XDB::execute("DELETE FROM groupex.announces diff --git a/modules/xnetlists.php b/modules/xnetlists.php index a393e97..31ac9c3 100644 --- a/modules/xnetlists.php +++ b/modules/xnetlists.php @@ -28,8 +28,8 @@ class XnetListsModule extends ListsModule function handlers() { return array( - '%grp/lists' => $this->make_hook('lists', AUTH_MDP), - '%grp/lists/create' => $this->make_hook('create', AUTH_MDP), + '%grp/lists' => $this->make_hook('lists', AUTH_MDP, 'groupmember'), + '%grp/lists/create' => $this->make_hook('create', AUTH_MDP, 'groupmember'), '%grp/lists/members' => $this->make_hook('members', AUTH_COOKIE), '%grp/lists/trombi' => $this->make_hook('trombi', AUTH_COOKIE), @@ -75,8 +75,7 @@ class XnetListsModule extends ListsModule return PL_NOT_FOUND; } $this->prepare_client($page); - - new_group_page('xnetlists/index.tpl'); + $page->changeTpl('xnetlists/index.tpl'); if (Get::has('del')) { $this->client->unsubscribe(Get::v('del')); @@ -121,7 +120,6 @@ class XnetListsModule extends ListsModule return PL_NOT_FOUND; } $this->prepare_client($page); - $page->changeTpl('xnetlists/create.tpl'); if (!Post::has('submit')) { @@ -198,7 +196,6 @@ class XnetListsModule extends ListsModule return PL_NOT_FOUND; } $this->prepare_client($page); - $page->changeTpl('xnetlists/sync.tpl'); if (Env::has('add')) { @@ -244,8 +241,7 @@ class XnetListsModule extends ListsModule if (!$globals->asso('mail_domain') || is_null($lfull)) { return PL_NOT_FOUND; } - - new_groupadmin_page('xnetlists/alias-admin.tpl'); + $page->changeTpl('xnetlists/alias-admin.tpl'); if (Env::has('add_member')) { $add = Env::v('add_member'); @@ -320,7 +316,7 @@ class XnetListsModule extends ListsModule if (!$globals->asso('mail_domain')) { return PL_NOT_FOUND; } - new_groupadmin_page('xnetlists/alias-create.tpl'); + $page->changeTpl('xnetlists/alias-create.tpl'); if (!Post::has('submit')) { return; -- 2.1.4