X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fwiki%2Ffarmconfig.php;h=8a0f9a382bda4e9be3550556aef49bdab7fddb4c;hb=35accc05937cab56b7002899c77b0a53b381a53a;hp=b15491a524350ef87d49bf131d0e5841f3a396cf;hpb=805f3d1679a53bb04fff34619c171a1381068612;p=platal.git diff --git a/include/wiki/farmconfig.php b/include/wiki/farmconfig.php index b15491a..8a0f9a3 100644 --- a/include/wiki/farmconfig.php +++ b/include/wiki/farmconfig.php @@ -96,16 +96,8 @@ function doBicol($column=false) function doPlatalLink($link, $text) { if (strlen(trim($text)) == 0) { - $res = XDB::query("SELECT u.nom, u.prenom, u.promo, q.profile_nick AS surnom - FROM auth_user_md5 AS u - INNER JOIN auth_user_quick AS q USING(user_id) - INNER JOIN aliases AS a ON u.user_id = a.id - WHERE a.alias = {?}", $link); - $row = $res->fetchOneAssoc(); - $text = $row['prenom'] . ' ' . $row['nom'] . ' X' . $row['promo']; - if ($row['surnom']) { - $text .= ' (alias ' . $row['surnom'] . ')'; - } + $user = User::get($link); + $text = $user->fullName(); } return '' . $text . ''; }