function _advpoll_clear_votes_access in Advanced Poll 7.2
Same name and namespace in other branches
- 6.3 advpoll.module \_advpoll_clear_votes_access()
- 6 advpoll.module \_advpoll_clear_votes_access()
- 6.2 advpoll.module \_advpoll_clear_votes_access()
- 7.3 advpoll.module \_advpoll_clear_votes_access()
- 7 advpoll.module \_advpoll_clear_votes_access()
Clear votes access callback.
Parameters
$node: An advanced poll node.
Return value
Returns TRUE or FALSE
1 string reference to '_advpoll_clear_votes_access'
- advpoll_menu in ./
advpoll.module - Implements hook_menu()
File
- ./
advpoll.module, line 1023
Code
function _advpoll_clear_votes_access($node) {
if ($node->type == 'advpoll') {
$votes = advpoll_get_votes($node->nid);
return $votes['total'] > 0 && user_access('administer polls');
}
}