Closed (outdated)
Project:
Advanced Poll
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Jan 2008 at 01:05 UTC
Updated:
9 Mar 2017 at 19:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
igorik commentedHi
I redeclare this feature request as a bug.
On page with votes for some poll is written: This table lists all the recorded votes for this poll...
But sql query in advpoll.module has only 20 results and no paging.
$result = pager_query("SELECT v.uid, v.hostname, v.timestamp, 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 GROUP BY v.uid, v.hostname, v.timestamp". tablesort_sql($header), 20, 0, NULL, $node->nid);
So probably there is needed to add input into admin poll setting how many results he want on page and change it in query into that variable, and add paging into this page. (or just to add paging into this page)
Thanks
Igorik
http://www.somvprahe.sk
Comment #2
maartenvg commentedAs far as I can see you can remove the GROUP BY statement. It interferes with the pager, which causes it to be hidden, and it doesn't serve a goal.
Comment #3
jrglasgow commentedI found this problem as well. Here is a patch that will solve the issue, at least it solved it for me.
the pager_query() function takes a count query as an option. It says in the documentation that
I have customized the count query to return the count.
Comment #4
miro_dietikersounds reasonable to introduce a separate pager query then.
Comment #5
miro_dietikerWe should first check and correct the current version for this issue.
Is this still present in 6--1?
Comment #6
miro_dietikerUpdating the patch to represent current codebase. This might be committed as intermediate solution.
Note that the whole advpoll_votes_page() should be reworked completely. Current code is very ugly and not reliable.
See some related documents:
http://drupal.org/node/142144
http://nanwich.info/DBPager.htm
http://api.drupal.org/api/function/pager_query
Comment #7
miro_dietikerCommitted to have the working pager for the moment.
(Changed codestyle of SQL to have structural representation of the statements..)
Switching to needs work to force the need to overhaul the results queries in total.
Comment #8
gobinathmD6 is EOL hence this issue won't be fixed (or) attended. So closing it.