You are here

function rules_update_6003 in Rules 6

Flips all argument maps of all rule elements. This is necessary as the format has changed.

File

rules/rules.install, line 122
Rules - Installation file.

Code

function rules_update_6003() {
  drupal_load('module', 'rules');
  $rules = rules_get_configured_items('rules');
  foreach ($rules as $name => $rule) {
    if (($rule['#status'] == 'altered' || $rule['#status'] == 'custom') && !isset($rule['#version'])) {
      $rule = rules_rule_format_upgrade_6003($rule);
      rules_item_save('rules', $name, $rule);
    }
  }
  return array();
}