function advpoll_view_results in Advanced Poll 6.3
Same name and namespace in other branches
- 5 advpoll.module \advpoll_view_results()
- 6 advpoll.module \advpoll_view_results()
- 6.2 advpoll.module \advpoll_view_results()
Show results of the vote.
This calls the appropriate vote results function, depending on the mode. It will call advpoll_view_results_$mode, similarly to advpoll_view_voting().
2 calls to advpoll_view_results()
- advpoll_view in ./
advpoll.module - Implementation of hook_view().
- _advpoll_vote_response in ./
advpoll.module
File
- ./
advpoll.module, line 1380 - Advanced Poll - a sophisticated polling module for voting, elections, and group decision-making.
Code
function advpoll_view_results(&$node, $teaser, $page) {
$output = '';
$mode = _advpoll_get_mode($node->type);
//if (_advpoll_can_view_results($node)) {
if (function_exists('advpoll_view_results_' . $mode)) {
$results = call_user_func('advpoll_view_results_' . $mode, $node, $teaser, $page);
$output .= theme('advpoll_results', check_plain($node->title), $results['results'], $results['votes'], isset($node->links) ? $node->links : array(), $node->nid, $node->voted, $node->cancel_vote, $node->footer_message);
}
$output .= _advpoll_show_cancel_form($node);
return $output;
}