diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-09-02 12:36:14 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-09-02 12:36:14 +0000 |
commit | 94c4e0354878f363f79e54ee34d3b5e8ca35566b (patch) | |
tree | dd955f8b8a674a523d3198825d17880ac2c38587 /modules/node | |
parent | 3d6b273206476f7dcc8f36b030b1b35425c62a4d (diff) | |
download | brdo-94c4e0354878f363f79e54ee34d3b5e8ca35566b.tar.gz brdo-94c4e0354878f363f79e54ee34d3b5e8ca35566b.tar.bz2 |
#115689 by chx: new content types should not overwrite old ones
Diffstat (limited to 'modules/node')
-rw-r--r-- | modules/node/content_types.inc | 5 |
1 files changed, 1 insertions, 4 deletions
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))); } } |