From 94c4e0354878f363f79e54ee34d3b5e8ca35566b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Sun, 2 Sep 2007 12:36:14 +0000 Subject: #115689 by chx: new content types should not overwrite old ones --- modules/node/content_types.inc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/node/content_types.inc b/modules/node/content_types.inc index 90ea9cace..0d8d0adec 100644 --- a/modules/node/content_types.inc +++ b/modules/node/content_types.inc @@ -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))); } } -- cgit v1.2.3