From: Florent Bruneau Date: Sun, 8 Feb 2009 16:55:26 +0000 (+0100) Subject: Fixes and minor improvements. X-Git-Tag: xorg/1.0.0~332^2~386 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=1f7596555b23f85ceeeb2f248e8d6296f8c68eb4;p=platal.git Fixes and minor improvements. Signed-off-by: Florent Bruneau --- diff --git a/classes/xnetsession.php b/classes/xnetsession.php index ee71322..cb125d5 100644 --- a/classes/xnetsession.php +++ b/classes/xnetsession.php @@ -95,7 +95,7 @@ class XnetSession extends XorgSession if ($level == AUTH_SUID) { S::set('auth', AUTH_MDP); } - $res = XDB::query("SELECT a.uid, a.display_name, a.full_name, + $res = XDB::query("SELECT a.uid, a.hruid, a.display_name, a.full_name, a.sex = 'female' AS femme, a.email_format, a.token, at.perms, a.is_admin diff --git a/modules/xnetgrp.php b/modules/xnetgrp.php index 1387f72..938a6a6 100644 --- a/modules/xnetgrp.php +++ b/modules/xnetgrp.php @@ -66,7 +66,6 @@ class XnetGrpModule extends PLModule function handler_index(&$page, $arg = null) { global $globals, $platal; - if (!is_null($arg)) { return PL_NOT_FOUND; } diff --git a/modules/xnetgrp/mail.inc.php b/modules/xnetgrp/mail.inc.php index 2b66a8e..8edc98f 100644 --- a/modules/xnetgrp/mail.inc.php +++ b/modules/xnetgrp/mail.inc.php @@ -65,11 +65,8 @@ function _send_xnet_mail($user, $body, $wiki, $mailer, $replyto = null) $pnom = ''; } - $text = $body; - $text = preg_replace('!!i', $cher, $text); - $text = preg_replace('!!i', $nom, $text); - $text = preg_replace('!!i', $pnom, $text); - + $text = str_ireplace(array('', '', ''), + array($cher, $nom, $pnom), $body); $mailer->addTo($user); if ($replyto) { $mailer->addHeader('Reply-To', $replyto); diff --git a/templates/xnet/skin.tpl b/templates/xnet/skin.tpl index 9326e03..73a9a98 100644 --- a/templates/xnet/skin.tpl +++ b/templates/xnet/skin.tpl @@ -80,9 +80,9 @@ {$xnet_type} - {if $asso} + {if t($asso)} - {if $asso->site} + {if t($asso->site)} LOGO {else} LOGO