From: Stéphane Jacob Date: Wed, 31 Aug 2011 10:59:00 +0000 (+0200) Subject: Only display name when using name in moderation email. X-Git-Tag: xorg/1.1.3~23 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=f16f89d80523ad8045e9156b733aefae8af7420d;p=platal.git Only display name when using name in moderation email. Signed-off-by: Stéphane Jacob --- 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) :