Commit ed48af4c authored by Gábor Hojtsy's avatar Gábor Hojtsy

#181195 by hunmonk and Pasqualle: node type related variables were not...

#181195 by hunmonk and Pasqualle: node type related variables were not properly renamed, when node type names changed
parent dde0923c
......@@ -299,19 +299,20 @@ function node_type_form_submit($form, &$form_state) {
// Save or reset persistent variable values.
foreach ($variables as $key => $value) {
$key .= '_'. $type->type;
$variable_new = $key .'_'. $type->type;
$variable_old = $key .'_'. $type->old_type;
if ($op == t('Reset to defaults')) {
variable_del($key);
variable_del($variable_old);
}
else {
if (is_array($value)) {
$value = array_keys(array_filter($value));
}
variable_set($key, $value);
variable_set($variable_new, $value);
if ($type->old_type != $type->type) {
$key = str_replace($type->type, $type->old_type, $key);
variable_del($key);
if ($variable_new != $variable_old) {
variable_del($variable_old);
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment