From: x2003bruneau Date: Fri, 2 Mar 2007 13:08:30 +0000 (+0000) Subject: On Xnet %grp/site redirects to the group's website X-Git-Tag: xorg/0.9.14~246 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=d430f4d878970c3e18a96eb8910affe269d474e9;p=platal.git On Xnet %grp/site redirects to the group's website git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1536 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/modules/xnetgrp.php b/modules/xnetgrp.php index f340068..5c7939e 100644 --- a/modules/xnetgrp.php +++ b/modules/xnetgrp.php @@ -76,6 +76,7 @@ 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), @@ -205,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;