From d016fb14f43976ba184d3e0597065b15f5eca1f0 Mon Sep 17 00:00:00 2001 From: natrak <> Date: Wed, 25 Jul 2001 12:21:48 +0000 Subject: common.inc - format_username() now takes a second optional parameter which gives the real name of the user. Rest - updated the calls to format_username() where appropriate to show the name of the user instead of the account id. Clicking on a name will still give you the account info etc. If you find a place where the real name is not shown let me know. --- modules/rating.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/rating.module b/modules/rating.module index 166edd12f..1cc82c381 100644 --- a/modules/rating.module +++ b/modules/rating.module @@ -79,12 +79,12 @@ function rating_gravity($id) { } function rating_list($limit) { - $result = db_query("SELECT u.userid, u.rating, r.* FROM users u LEFT JOIN rating r ON u.id = r.user ORDER BY u.rating DESC LIMIT $limit"); + $result = db_query("SELECT u.userid, u.rating, u.name, r.* FROM users u LEFT JOIN rating r ON u.id = r.user ORDER BY u.rating DESC LIMIT $limit"); $output .= "
". ++$i .". | ". format_username($account->userid) ." | ". check_output($account->rating) ." | (". ($ranking < 0 ? "" : "+") ."$ranking) |
". ++$i .". | ". format_username($account->userid, $account->name) ." | ". check_output($account->rating) ." | (". ($ranking < 0 ? "" : "+") ."$ranking) |