From e04f6d2328820cded0c853888fdea57119a8fee2 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 16 Aug 2002 07:37:03 +0000 Subject: - Made the rating module and its SQL table ASNI compliant. Patch by jaa. --- 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 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 .= "\n"; while ($account = db_fetch_object($result)) { - $ranking = $account->old - $account->new; + $ranking = $account->previous - $account->current; $output .= ""; } $output .= "
". ++$i .".". format_name($account) ."". check_output($account->rating) ."(". ($ranking < 0 ? "" : "+") ."$ranking)
\n"; -- cgit v1.2.3