From f97999d1a49a6d5882003a91cce5cd04abbef021 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 30 Sep 2004 18:13:25 +0000 Subject: - Patch #10920 by jhriggs: fixed bug with comment moderation. --- modules/comment.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/comment.module') diff --git a/modules/comment.module b/modules/comment.module index d4329c956..38a71846a 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -1277,7 +1277,7 @@ function comment_moderate() { $moderation = $_POST['moderation']; if ($moderation) { - $result = db_query('SELECT mid, MAX(value) AS value FROM {moderation_roles} WHERE rid IN (%s) GROUP BY mid', implode(', ', array_keys($user->roles))); + $result = db_query('SELECT DISTINCT mid, value, ABS(value) FROM {moderation_roles} WHERE rid IN (%s) ORDER BY mid, ABS(value), value', implode(', ', array_keys($user->roles))); while ($mod = db_fetch_object($result)) { $votes[$mod->mid] = $mod->value; } -- cgit v1.2.3