X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=plugins%2Ffunction.profile.php;h=fc7087fc61a02ad46a80b1aa2bbb42f4f3397a01;hb=96b778a679b261235ede8c5c4e7356680f4e5895;hp=abfb165f2565eb6a078dfce4b4b4f7634eda8d2a;hpb=1ea2d001c2511d30bae13fe3aed0e698919380a8;p=platal.git
diff --git a/plugins/function.profile.php b/plugins/function.profile.php
index abfb165..fc7087f 100644
--- a/plugins/function.profile.php
+++ b/plugins/function.profile.php
@@ -1,6 +1,6 @@
b('groupperms', true);
$raw = $params->b('raw', false);
$user = $params->v('user');
+ $profile = $params->v('profile');
+
if (is_int($user) || ctype_digit($user)) {
$user = User::getWithUID($user);
}
@@ -52,12 +54,17 @@ function smarty_function_profile($params, $smarty)
$name = '•' . $name;
}
if ($with_link) {
- $profile = ($user instanceof Profile) ? $user : $user->profile();
+ if (is_null($profile)) {
+ $profile = $user->profile();
+ }
+
if ($profile) {
$name = '';
}
}
- if ($user->lost) {
+ if ($profile && $profile->isDead()) {
+ $name .= ' †';
+ } else if ($user->lost) {
$name .= ' ';
}
if ($with_groupperms && $user instanceof User && $user->group_perms == 'admin' && !empty($name)) {
@@ -66,5 +73,5 @@ function smarty_function_profile($params, $smarty)
return $name;
}
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8:
?>