function advpoll_calculate_results_binary in Advanced Poll 5        
                          
                  
                        Same name and namespace in other branches
- 6.3 modes/binary.inc \advpoll_calculate_results_binary()
- 6 modes/binary.inc \advpoll_calculate_results_binary()
- 6.2 modes/binary.inc \advpoll_calculate_results_binary()
File
 
   - modes/binary.inc, line 155
Code
function advpoll_calculate_results_binary(&$results, $votes, $node) {
  $voters = array();
  foreach ($votes as $vote) {
    if ($vote->uid) {
      $key = $vote->uid;
    }
    else {
      $key = $vote->hostname;
    }
    $voters[$key] = TRUE;
  }
  $results['_advpoll'] = array(
    array(
      'total_votes' => count($voters),
    ),
  );
}