From: Florent Bruneau Date: Sun, 28 Dec 2008 20:50:56 +0000 (+0100) Subject: Simpler code. X-Git-Tag: xorg/1.0.0~332^2~452 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=ec9b34309e13d3ef36df1da0f8604223ce5a3069;p=platal.git Simpler code. Signed-off-by: Florent Bruneau --- diff --git a/core b/core index e4f6c7d..80d0423 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit e4f6c7d0410bdc8c0f62abc4ee17092dbc52126c +Subproject commit 80d0423e13a1fbf932fa8b27f323af0d504a7873 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 . ''; }