You are here

function rules_item_change_name in Rules 6

Change the name of a rules item.

2 calls to rules_item_change_name()
rules_admin_form_edit_rule_set_submit in rules_admin/rules_admin.sets.inc
rules_admin_rule_proxy::save_rule in rules_admin/rules_admin.rule_proxy.inc
Saves a the rule in the database

File

rules/rules.module, line 827
Rules engine module

Code

function rules_item_change_name($item_type, $old_name, $new_name) {
  if ($info = rules_get_items($item_type)) {
    db_query("UPDATE {" . $info['db_table'] . "} SET name = '%s' WHERE name = '%s' ", $new_name, $old_name);
  }
}