? .decisions.module.swp ? .git ? decisions-6.x-0.1-beta3-399952-3.patch ? decisions-HEAD-400020-4.patch ? decisions_node_load_and_form_0.patch ? decisions_node_load_validate.patch ? paging.patch Index: decisions.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/decisions/decisions.module,v retrieving revision 1.220 diff -u -r1.220 decisions.module --- decisions.module 31 Jul 2009 16:46:16 -0000 1.220 +++ decisions.module 19 Aug 2009 21:58:58 -0000 @@ -663,12 +663,15 @@ $header[] = array('data' => t('Visitor'), 'field' => 'u.name'); $header[] = array('data' => t('Vote'), ''); - $result = pager_query('SELECT v.value, v.uid, v.vote_source, v.tag, u.name FROM {votingapi_vote} v LEFT JOIN {users} u ON v.uid = u.uid WHERE v.content_id = %d'. tablesort_sql($header), 20, 0, NULL, $node->nid); + // select uid,content_id,group_concat(distinct tag order by value) from votingapi_vote group by uid,content_id; + $query = 'SELECT u.name, v.uid, v.vote_source, GROUP_CONCAT(DISTINCT v.tag ORDER BY v.value) as votes FROM {votingapi_vote} v LEFT JOIN {users} u ON v.uid = u.uid WHERE v.content_id = %d GROUP BY v.uid' . tablesort_sql($header) . ''; + $query_count = 'SELECT v.value, v.uid, v.vote_source, v.tag, u.name FROM {votingapi_vote} v LEFT JOIN {users} u ON v.uid = u.uid WHERE v.content_id = %d'. tablesort_sql($header); + $result = pager_query($query, 20, 0, NULL, $node->nid); $votes = array(); $names = array(); while ($vote = db_fetch_object($result)) { $key = $vote->uid? $vote->uid : $vote->vote_source; - $votes[$key][] = $vote; + $votes[$key] = explode(',', $vote->votes); $names[$key] = $vote->name ? theme('username', $vote) : check_plain($vote->vote_source); } Index: modes/ranking.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/decisions/modes/ranking.module,v retrieving revision 1.21 diff -u -r1.21 ranking.module --- modes/ranking.module 19 Aug 2009 20:55:31 -0000 1.21 +++ modes/ranking.module 19 Aug 2009 21:58:58 -0000 @@ -230,7 +230,7 @@ $ordered_votes = array(); foreach ($votes as $vote) { // Need two dimensional results (if equal rankings are allowed) - $ordered_votes[$vote->value][] = check_plain($node->choice[$vote->tag]['label']); + $ordered_votes[$vote->value][] = check_plain($node->choice[$vote]['label']); } asort($ordered_votes); $rankings = array(); @@ -879,4 +879,4 @@ $ranking[$round_count][0] = "Tie for Win"; } return $ranking; -} \ No newline at end of file +} Index: modes/selection.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/decisions/modes/selection.module,v retrieving revision 1.13 diff -u -r1.13 selection.module --- modes/selection.module 27 Jul 2009 23:25:43 -0000 1.13 +++ modes/selection.module 19 Aug 2009 21:58:58 -0000 @@ -142,9 +142,7 @@ $unordered_votes = array(); foreach ($votes as $vote) { // Just need one dimensional results - if ($vote->value > 0) { - $unordered_votes[] = check_plain($node->choice[$vote->tag]['label']); - } + $unordered_votes[] = check_plain($node->choice[$vote]['label']); } return implode(', ', $unordered_votes); }