diff options
-rw-r--r-- | modules/comment.module | 2 | ||||
-rw-r--r-- | modules/comment/comment.module | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/comment.module b/modules/comment.module index 67197bbdb..a6f848f74 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -1503,7 +1503,7 @@ function theme_comment_moderation_form($comment) { // comment hasn't been moderated yet: if (!isset($votes) && $user->roles) { - $result = db_query('SELECT v.mid, v.vote, MAX(r.value) AS value FROM {moderation_votes} v INNER JOIN {moderation_roles} r ON r.mid = v.mid WHERE r.rid IN (%s) GROUP BY v.mid, v.vote ORDER BY weight', implode(', ', array_keys($user->roles))); + $result = db_query('SELECT v.mid, v.vote, MAX(v.weight) AS weight, MAX(r.value) AS value FROM {moderation_votes} v INNER JOIN {moderation_roles} r ON r.mid = v.mid WHERE r.rid IN (%s) GROUP BY v.mid, v.vote ORDER BY weight', implode(', ', array_keys($user->roles))); $votes = array(); while ($vote = db_fetch_object($result)) { if ($vote->value != 0) { diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 67197bbdb..a6f848f74 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1503,7 +1503,7 @@ function theme_comment_moderation_form($comment) { // comment hasn't been moderated yet: if (!isset($votes) && $user->roles) { - $result = db_query('SELECT v.mid, v.vote, MAX(r.value) AS value FROM {moderation_votes} v INNER JOIN {moderation_roles} r ON r.mid = v.mid WHERE r.rid IN (%s) GROUP BY v.mid, v.vote ORDER BY weight', implode(', ', array_keys($user->roles))); + $result = db_query('SELECT v.mid, v.vote, MAX(v.weight) AS weight, MAX(r.value) AS value FROM {moderation_votes} v INNER JOIN {moderation_roles} r ON r.mid = v.mid WHERE r.rid IN (%s) GROUP BY v.mid, v.vote ORDER BY weight', implode(', ', array_keys($user->roles))); $votes = array(); while ($vote = db_fetch_object($result)) { if ($vote->value != 0) { |