Fixes and minor improvements.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 8 Feb 2009 16:55:26 +0000 (17:55 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 8 Feb 2009 16:55:26 +0000 (17:55 +0100)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
classes/xnetsession.php
modules/xnetgrp.php
modules/xnetgrp/mail.inc.php
templates/xnet/skin.tpl

index ee71322..cb125d5 100644 (file)
@@ -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
index 1387f72..938a6a6 100644 (file)
@@ -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;
         }
index 2b66a8e..8edc98f 100644 (file)
@@ -65,11 +65,8 @@ function _send_xnet_mail($user, $body, $wiki, $mailer, $replyto = null)
         $pnom = '';
     }
 
-    $text = $body;
-    $text = preg_replace('!<cher>!i',   $cher, $text);
-    $text = preg_replace('!<nom>!i',    $nom,  $text);
-    $text = preg_replace('!<prenom>!i', $pnom, $text);
-
+    $text = str_ireplace(array('<cher>', '<nom>', '<prenom>'),
+                         array($cher, $nom, $pnom), $body);
     $mailer->addTo($user);
     if ($replyto) {
         $mailer->addHeader('Reply-To', $replyto);
index 9326e03..73a9a98 100644 (file)
@@ -80,9 +80,9 @@
             <td style="width: 280px">
               <a href="{if $xnet_type eq 'plan'}plan{else}groups/{$xnet_type}{/if}"><img src="images/texte_{$xnet_type}.jpg" alt="{$xnet_type}" width="280" height="96" /></a>
             </td>
-            {if $asso}
+            {if t($asso)}
             <td class="logo">
-              {if $asso->site}
+              {if t($asso->site)}
                 <a href="{$asso->site}"><img src='{$platal->ns}logo' alt="LOGO" height="80" /></a>
               {else}
                 <img src='{$platal->ns}logo' alt="LOGO" height="80"/>