function advpoll_view_results in Advanced Poll 5
Same name and namespace in other branches
- 6.3 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
1 string reference to 'advpoll_view_results'
- advpoll_update_2 in ./
advpoll.install - Migrate old global settings to new per-content-type settings.
File
- ./
advpoll.module, line 1355 - Advanced Poll - a sophisticated polling module for voting, elections, and group decision-making.
Code
function advpoll_view_results(&$node, $teaser, $page) {
$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'], $node->links, $node->nid, $node->voted, $node->cancel_vote);
}
}
$output .= _advpoll_show_cancel_form($node);
return $output;
}