X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fwiki%2Ffarmconfig.php;h=2faf4f940d9ccf46d27eb46a48934678083d623f;hb=0a7895a33d0aa761b00a5df06b7f775455782669;hp=d461c25e4abb287df54fc0a9cbfdb1116e826ac5;hpb=0783a5ed4d3409bcd7a7e1d908696159999810c8;p=platal.git diff --git a/include/wiki/farmconfig.php b/include/wiki/farmconfig.php index d461c25..2faf4f9 100644 --- a/include/wiki/farmconfig.php +++ b/include/wiki/farmconfig.php @@ -20,7 +20,7 @@ $Skin = 'empty'; @include_once("$FarmD/cookbook/e-protect.php"); include_once($FarmD.'/scripts/xlpage-utf-8.php'); -ResolvePageName(); +$pagename = ResolvePageName($pagename); if ($action == 'rss' || $action == 'atom' || $action == 'rdf' || $action == 'dc') { $FmtPV['$MarkupExcerpt'] = '$page["text"]'; @@ -97,16 +97,11 @@ 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'] . ')'; + $profile = Profile::get($link); + if (!$profile) { + return '##Utilisateur inconnu##' . $text . '##'; } + $text = $profile->fullName(); } return '' . $text . ''; }