function _advpoll_can_view_results in Advanced Poll 5
Same name and namespace in other branches
- 6.3 advpoll.module \_advpoll_can_view_results()
- 6 advpoll.module \_advpoll_can_view_results()
- 6.2 advpoll.module \_advpoll_can_view_results()
Helper function to abstract view results checking.
2 calls to _advpoll_can_view_results()
- advpoll_menu in ./
advpoll.module - Implementation of hook_menu().
- advpoll_view_results in ./
advpoll.module - Show results of the vote.
File
- ./
advpoll.module, line 1123 - Advanced Poll - a sophisticated polling module for voting, elections, and group decision-making.
Code
function _advpoll_can_view_results($node) {
$view_results = variable_get('advpoll_view_results_' . $node->type, ADVPOLL_VIEW_RESULTS);
return !_advpoll_is_active($node) || $node->voted && $view_results == 'aftervote' || $view_results == 'always';
// All can view
}