X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fxnetgrp.php;h=e0da41d5ef43b1982dd1eac705b3127875646ade;hb=9ed396c06e661970436bcd81ecc4d758fa647ce0;hp=2383b301533280c82a766e508429c237d2eb1f75;hpb=b9dcbdddb6ac127cb08bcc6c279ec58d0663c3a0;p=platal.git diff --git a/modules/xnetgrp.php b/modules/xnetgrp.php index 2383b30..e0da41d 100644 --- a/modules/xnetgrp.php +++ b/modules/xnetgrp.php @@ -76,8 +76,10 @@ class XnetGrpModule extends PLModule '%grp' => $this->make_hook('index', AUTH_PUBLIC), '%grp/asso.php' => $this->make_hook('index', AUTH_PUBLIC), '%grp/logo' => $this->make_hook('logo', AUTH_PUBLIC), + '%grp/site' => $this->make_hook('site', AUTH_PUBLIC), '%grp/edit' => $this->make_hook('edit', AUTH_MDP), '%grp/mail' => $this->make_hook('mail', AUTH_MDP), + '%grp/forum' => $this->make_hook('forum', AUTH_MDP), '%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), @@ -94,7 +96,7 @@ class XnetGrpModule extends PLModule '%grp/member/new' => $this->make_hook('admin_member_new', AUTH_MDP), '%grp/member/new/ajax' - => $this->make_hook('admin_member_new_ajax', AUTH_MDP, '', NO_AUTH), + => $this->make_hook('admin_member_new_ajax', AUTH_MDP, 'user', NO_AUTH), '%grp/member/del' => $this->make_hook('admin_member_del', AUTH_MDP), @@ -204,6 +206,18 @@ class XnetGrpModule extends PLModule exit; } + function handler_site(&$page) + { + global $globals; + $site = $globals->asso('site'); + if (!$site) { + $page->trig('Le groupe n\'a pas de site web'); + return $this->handler_index($page); + } + header("Location: $site"); + exit; + } + function handler_edit(&$page) { global $globals; @@ -294,6 +308,19 @@ class XnetGrpModule extends PLModule } } + function handler_forum(&$page, $group = null, $artid = null) + { + global $globals; + new_group_page('xnetgrp/forum.tpl'); + if (!$globals->asso('forum')) { + return PL_NOT_FOUND; + } + require_once 'banana/forum.inc.php'; + $get = array(); + get_banana_params($get, $globals->asso('forum'), $group, $artid); + run_banana($page, 'ForumsBanana', $get); + } + function handler_annuaire(&$page) { global $globals;