You are here

function rules_log_evaluated_rule in Rules 6

Remembers the currently evaluated rules. With this information, recursion is prevented

Parameters

$rule The rule, which execution should be logged:

1 call to rules_log_evaluated_rule()
rules_execute_rule in rules/rules.module
Execution handler for rules

File

rules/rules.module, line 739
Rules engine module

Code

function rules_log_evaluated_rule($rule) {
  global $_rules_exec_log;
  if (!isset($_rules_exec_log)) {
    $_rules_exec_log = array();
  }
  $count = isset($_rules_exec_log[$rule['#set']][$rule['#name']]) ? $_rules_exec_log[$rule['#set']][$rule['#name']] : 0;
  $_rules_exec_log[$rule['#set']][$rule['#name']] = $count + 1;
}