From f16f89d80523ad8045e9156b733aefae8af7420d Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Wed, 31 Aug 2011 12:59:00 +0200 Subject: [PATCH] Only display name when using name in moderation email. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- plugins/function.profile.php | 11 ++++++++--- templates/lists/moderate_mail.tpl | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/plugins/function.profile.php b/plugins/function.profile.php index 516f019..fe40261 100644 --- a/plugins/function.profile.php +++ b/plugins/function.profile.php @@ -27,6 +27,7 @@ function smarty_function_profile($params, $smarty) $with_link = $params->b('link', true); $with_dir = $params->b('directory', true); $with_groupperms = $params->b('groupperms', true); + $raw = $params->b('raw', true); $user = $params->v('user'); if (is_int($user) || ctype_digit($user)) { $user = User::getWithUID($user); @@ -37,15 +38,19 @@ function smarty_function_profile($params, $smarty) } else { $name = pl_entities($user->fullName()); } - if ($with_sex && $user->isFemale()) { - $name = '•' . $name; - } if ($with_promo) { $promo = $user->category(); if ($promo) { $name .= ' (' . pl_entities($promo) . ')'; } } + if ($raw) { + return $name; + } + + if ($with_sex && $user->isFemale()) { + $name = '•' . $name; + } if ($with_link) { $profile = ($user instanceof Profile) ? $user : $user->profile(); if ($profile) { diff --git a/templates/lists/moderate_mail.tpl b/templates/lists/moderate_mail.tpl index 94ef8cf..8b8eeae 100644 --- a/templates/lists/moderate_mail.tpl +++ b/templates/lists/moderate_mail.tpl @@ -35,7 +35,7 @@ raison (pour les refus) : -- 2.1.4