function rules_i18n_rules_config_defaults_rebuild

Implements hook_rules_config_defaults_rebuild().

File

rules_i18n/rules_i18n.module, line 121

Code

function rules_i18n_rules_config_defaults_rebuild($rules_configs, $originals) {
    // Once all defaults have been rebuilt, update all i18n strings at once. That
    // way we build the rules cache once the rebuild is complete and avoid
    // rebuilding caches for each updated rule.
    foreach ($rules_configs as $name => $rule_config) {
        if (empty($originals[$name])) {
            rules_i18n_rules_config_insert($rule_config);
        }
        else {
            rules_i18n_rules_config_update($rule_config, $originals[$name]);
        }
    }
}