X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=plugins%2Ffunction.profile.php;h=abfb165f2565eb6a078dfce4b4b4f7634eda8d2a;hb=fe5ccad978199cfbe71c583280b999769a27c9b2;hp=3a05b6148aa7e882489673bc409e19f3c0f7825e;hpb=1c4a1d0a32c52851e9ffbbf585bb206c9a472dc9;p=platal.git diff --git a/plugins/function.profile.php b/plugins/function.profile.php index 3a05b61..abfb165 100644 --- a/plugins/function.profile.php +++ b/plugins/function.profile.php @@ -1,6 +1,6 @@ b('promo', false) || $params->b('cat', false); @@ -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', false); $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) {