summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authornatrak <>2001-07-25 12:21:48 +0000
committernatrak <>2001-07-25 12:21:48 +0000
commitd016fb14f43976ba184d3e0597065b15f5eca1f0 (patch)
treed3303a5c55095cdbbc94926274a1512b1b85387c /modules
parente0dc03dccd90fb6dc0130233719f74429a547cd4 (diff)
downloadbrdo-d016fb14f43976ba184d3e0597065b15f5eca1f0.tar.gz
brdo-d016fb14f43976ba184d3e0597065b15f5eca1f0.tar.bz2
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.
Diffstat (limited to 'modules')
-rw-r--r--modules/rating.module4
1 files changed, 2 insertions, 2 deletions
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 .= "<TABLE CELLPADDING=\"1\" CELLSPACING=\"1\">\n";
while ($account = db_fetch_object($result)) {
$ranking = $account->old - $account->new;
- $output .= "<TR><TD ALIGN=\"right\">". ++$i .".</TD><TD>". format_username($account->userid) ."</TD><TD ALIGN=\"right\">". check_output($account->rating) ."</TD><TD>(". ($ranking < 0 ? "" : "+") ."$ranking)</TD></TR>";
+ $output .= "<TR><TD ALIGN=\"right\">". ++$i .".</TD><TD>". format_username($account->userid, $account->name) ."</TD><TD ALIGN=\"right\">". check_output($account->rating) ."</TD><TD>(". ($ranking < 0 ? "" : "+") ."$ranking)</TD></TR>";
}
$output .= "</TABLE>\n";
return $output;