summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2002-08-16 07:37:03 +0000
committerDries Buytaert <dries@buytaert.net>2002-08-16 07:37:03 +0000
commite04f6d2328820cded0c853888fdea57119a8fee2 (patch)
tree75598f8d1c651dd4692b580bc925904aec681ce7 /modules
parentfc143e79a77973671b4a82e0cca817747e3b15d0 (diff)
downloadbrdo-e04f6d2328820cded0c853888fdea57119a8fee2.tar.gz
brdo-e04f6d2328820cded0c853888fdea57119a8fee2.tar.bz2
- Made the rating module and its SQL table ASNI compliant. Patch by jaa.
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 4f8fe48be..ae869304e 100644
--- a/modules/rating.module
+++ b/modules/rating.module
@@ -52,7 +52,7 @@ function rating_cron() {
$r2 = db_query("SELECT uid FROM users ORDER BY rating DESC");
while ($account = db_fetch_object($r2)) {
- db_query("INSERT INTO rating (uid, new, old) VALUES ('$account->uid', '". ++$j ."', '". $rating[$account->uid] ."')");
+ db_query("INSERT INTO rating (uid, current, previous) VALUES ('$account->uid', '". ++$j ."', '". $rating[$account->uid] ."')");
}
}
}
@@ -81,7 +81,7 @@ function rating_list($limit) {
$output .= "<table cellpadding=\"1\" cellspacing=\"1\">\n";
while ($account = db_fetch_object($result)) {
- $ranking = $account->old - $account->new;
+ $ranking = $account->previous - $account->current;
$output .= "<tr><td align=\"right\">". ++$i .".</td><td>". format_name($account) ."</td><td align=\"right\">". check_output($account->rating) ."</td><td>(". ($ranking < 0 ? "" : "+") ."$ranking)</td></tr>";
}
$output .= "</table>\n";