You are here

function rules_admin_rule_proxy::save_changes in Rules 6

Saves the changes in the rule and clears the cache if necessary.

File

rules_admin/rules_admin.rule_proxy.inc, line 92
Contains the rules proxy class

Class

rules_admin_rule_proxy
This is a smally proxy for the real rule. It provides some useful operations for the admin UI. It builds a small index for the elements of a rule, so that they can be easily identified and modified.

Code

function save_changes() {
  $rule = $this
    ->get_rule();
  $orig_rule = $this->_rule;
  if ($orig_rule != $rule || isset($this->_new_name)) {
    $this
      ->save_rule();
    rules_clear_cache();
  }
}