You are here

function voting_rules_condition_check_results in Voting Rules 7

Same name and namespace in other branches
  1. 6 voting_rules.rules.inc \voting_rules_condition_check_results()

Condition: Evaluate the results of the vote.

File

./voting_rules.rules.inc, line 310
Provides Rules integration for the Voting API module.

Code

function voting_rules_condition_check_results($args, RulesCondition $condition, $op) {
  foreach ($args['vote_results'] as $vote_result) {
    if ($vote_result['function'] == $args['function']) {
      return eval('return ' . (double) $vote_result['value'] . $args['operator'] . (double) $args['value'] . ';');
    }
  }
}