X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fxnetgrp.php;h=bfdea5edef8fc476d21c4537fa982ff318d52f05;hb=50579de4416173b970ad17fe8953414ebd2fa1c3;hp=02b973417cb3a4085f9ceab30655817819583910;hpb=805f3d1679a53bb04fff34619c171a1381068612;p=platal.git diff --git a/modules/xnetgrp.php b/modules/xnetgrp.php index 02b9734..bfdea5e 100644 --- a/modules/xnetgrp.php +++ b/modules/xnetgrp.php @@ -236,6 +236,15 @@ class XnetGrpModule extends PLModule if (Post::has('notif_unsub') && Post::i('notif_unsub') == 1) { $flags->addFlag('notif_unsub'); } + $site = trim(Post::v('site')); + if ($site && ($site != "http://")) { + $scheme = parse_url($site, PHP_URL_SCHEME); + if (!$scheme) { + $site = "http://" . $site; + } + } else { + $site = ""; + } if (S::has_perms()) { if (Post::v('mail_domain') && (strstr(Post::v('mail_domain'), '.') === false)) { $page->trigError("le domaine doit être un FQDN (aucune modif effectuée) !!!"); @@ -251,7 +260,7 @@ class XnetGrpModule extends PLModule WHERE id={?}", Post::v('nom'), Post::v('diminutif'), Post::v('cat'), Post::i('dom'), - Post::v('descr'), Post::v('site'), + Post::v('descr'), $site, Post::v('mail'), Post::v('resp'), Post::v('forum'), Post::v('mail_domain'), Post::has('ax'), Post::v('pub'), @@ -268,7 +277,7 @@ class XnetGrpModule extends PLModule forum={?}, ax={?}, pub= {?}, sub_url={?}, unsub_url={?},flags={?} WHERE id={?}", - Post::v('descr'), Post::v('site'), + Post::v('descr'), $site, Post::v('mail'), Post::v('resp'), Post::v('forum'), Post::has('ax'), Post::v('pub'), @@ -308,6 +317,7 @@ class XnetGrpModule extends PLModule $mmlist = new MMList(S::v('uid'), S::v('password'), $globals->asso('mail_domain')); $page->assign('listes', $mmlist->get_lists()); + $page->assign('user', S::user()); $page->addJsLink('ajax.js'); if (Post::has('send')) {