Merge commit 'origin/fusionax' into account
[platal.git] / include / wiki / farmconfig.php
index d461c25..617ebfb 100644 (file)
@@ -97,16 +97,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 '<a href="profile/' . $link . '" class="popup2">' . $text . '</a>';
 }