HTML validation, prevent empty strong tags
authorPascal Corpet <pascal.corpet@m4x.org>
Thu, 10 Jun 2010 19:44:30 +0000 (21:44 +0200)
committerPascal Corpet <pascal.corpet@m4x.org>
Sun, 13 Jun 2010 20:53:29 +0000 (22:53 +0200)
plugins/function.profile.php
templates/xnetgrp/annuaire.tpl

index 340e9ad..dfc4bf3 100644 (file)
@@ -47,7 +47,7 @@ function smarty_function_profile($params, &$smarty)
             $name = '<a href="profile/' . $profile->hrid() . '" class="popup2">' . $name . '</a>';
         }
     }
-    if ($with_groupperms && $user instanceof User && $user->group_perms == 'admin') {
+    if ($with_groupperms && $user instanceof User && $user->group_perms == 'admin' && !empty($name)) {
         $name = '<strong>' . $name . '</strong>';
     }
     return $name;
index 8b67893..08ae87f 100644 (file)
@@ -108,9 +108,9 @@ Le groupe {$asso->nom} compte {$nb_tot} membres&nbsp;:
       {profile user=$user promo=false}
     </td>
     <td>
-      {if $user->group_perms eq 'admin'}<strong>{/if}
+      {if $user->group_perms eq 'admin' && $user->promo()}<strong>{/if}
       {$user->promo()}
-      {if $user->group_perms eq 'admin'}</strong>{/if}
+      {if $user->group_perms eq 'admin' && $user->promo()}</strong>{/if}
     </td>
     {if $user->group_comm}
     <td>{$user->group_comm}</td>