function _authcache_poll in Authenticated User Page Caching (Authcache) 6
Same name and namespace in other branches
- 7 ajax/authcache.php \_authcache_poll()
Get poll results/form for user Response will be cached.
See also
File
- ajax/
authcache.php, line 213 - Authcache Ajax Callback (authcache.php)
Code
function _authcache_poll($vars) {
// FULL bootstrap required in case custom theming is used
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
$node = node_load($vars['nid']);
$node = poll_view($node, TRUE, FALSE, $vars['block']);
$output = $node->content['body']['#value'];
return array(
'nid' => $vars['nid'],
'block' => $vars['block'],
'html' => $output,
);
}