Commit 94c4e035 authored by Gábor Hojtsy's avatar Gábor Hojtsy

#115689 by chx: new content types should not overwrite old ones

parent 3d6b2732
......@@ -223,9 +223,6 @@ function node_type_form_validate($form, &$form_state) {
// Work out what the type was before the user submitted this form
$old_type = trim($form_state['values']['old_type']);
if (empty($old_type)) {
$old_type = $type->type;
}
$types = node_get_types('names');
......@@ -245,7 +242,7 @@ function node_type_form_validate($form, &$form_state) {
$names = array_flip($types);
if (isset($names[$type->name]) && $names[$type->name] != $old_type) {
form_set_error('name', t('The human-readable name %name is already taken.', array('%name' => $names[$type->name])));
form_set_error('name', t('The human-readable name %name is already taken.', array('%name' => $type->name)));
}
}
......
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