--- advpoll.module 2007-08-16 13:35:41.046875000 -0400 +++ advpoll_tabfix.module 2007-08-16 15:15:26.796875000 -0400 @@ -779,7 +779,10 @@ $header[] = array('data' => t('Visitor'), 'field' => 'u.name'); $header[] = array('data' => t('Vote'), ''); - $result = pager_query("SELECT v.value, v.uid, v.hostname, v.tag, u.name FROM {votingapi_vote} v LEFT JOIN {users} u ON v.uid = u.uid WHERE v.content_type='advpoll' AND v.content_id = %d". tablesort_sql($header), 20, 0, NULL, $node->nid); + // If the number of choices is not set, find out how many options there are. + $how_many = 20 * ($node->maxchoices ? $node->maxchoices : count($node->choice)); + + $result = pager_query("SELECT v.value, v.uid, v.hostname, v.tag, u.name FROM {votingapi_vote} v LEFT JOIN {users} u ON v.uid = u.uid WHERE v.content_type='advpoll' AND v.content_id = %d". tablesort_sql($header), $how_many, 0, NULL, $node->nid); $rows = array(); while ($vote = db_fetch_object($result)) { $key = $vote->uid? $vote->uid : $vote->hostname; @@ -819,7 +822,7 @@ } $output .= theme('table', $header, $results); - $output .= theme('pager', NULL, 20, 0); + $output .= theme('pager', NULL, $how_many, 0); print theme('page', $output); } else {