From a1534b3f60d76881cd8a7b468617dccf657f4926 Mon Sep 17 00:00:00 2001 From: Pascal Corpet Date: Thu, 10 Jun 2010 21:44:30 +0200 Subject: [PATCH] HTML validation, prevent empty strong tags --- plugins/function.profile.php | 2 +- templates/xnetgrp/annuaire.tpl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/function.profile.php b/plugins/function.profile.php index 340e9ad..dfc4bf3 100644 --- a/plugins/function.profile.php +++ b/plugins/function.profile.php @@ -47,7 +47,7 @@ function smarty_function_profile($params, &$smarty) $name = '' . $name . ''; } } - if ($with_groupperms && $user instanceof User && $user->group_perms == 'admin') { + if ($with_groupperms && $user instanceof User && $user->group_perms == 'admin' && !empty($name)) { $name = '' . $name . ''; } return $name; diff --git a/templates/xnetgrp/annuaire.tpl b/templates/xnetgrp/annuaire.tpl index 8b67893..08ae87f 100644 --- a/templates/xnetgrp/annuaire.tpl +++ b/templates/xnetgrp/annuaire.tpl @@ -108,9 +108,9 @@ Le groupe {$asso->nom} compte {$nb_tot} membres : {profile user=$user promo=false} - {if $user->group_perms eq 'admin'}{/if} + {if $user->group_perms eq 'admin' && $user->promo()}{/if} {$user->promo()} - {if $user->group_perms eq 'admin'}{/if} + {if $user->group_perms eq 'admin' && $user->promo()}{/if} {if $user->group_comm} {$user->group_comm} -- 2.1.4