function _advpoll_writeins_access in Advanced Poll 6.2
Same name and namespace in other branches
- 6.3 advpoll.module \_advpoll_writeins_access()
- 6 advpoll.module \_advpoll_writeins_access()
- 7.3 advpoll.module \_advpoll_writeins_access()
- 7 advpoll.module \_advpoll_writeins_access()
- 7.2 advpoll.module \_advpoll_writeins_access()
Writeins access callback.
1 string reference to '_advpoll_writeins_access'
- advpoll_menu in ./
advpoll.module - Implementation of hook_menu().
File
- ./
advpoll.module, line 234 - Advanced Poll - a sophisticated polling module for voting, elections, and group decision-making.
Code
function _advpoll_writeins_access($node) {
if (!strstr($node->type, 'advpoll_') || !user_access('administer polls')) {
return FALSE;
}
foreach ($node->choice as $choice) {
if ($choice['writein']) {
// Has at least one write-in choice.
return TRUE;
}
}
return FALSE;
}