Commit 3e9be681 authored by catch's avatar catch

Issue #1876546 by plopesc: node_type_form_validate() and...

Issue #1876546 by plopesc: node_type_form_validate() and node_type_form_submit() pointlessly trim machine name value.
parent 4f6facbd
......@@ -304,11 +304,11 @@ function _node_characters($length) {
*/
function node_type_form_validate($form, &$form_state) {
$type = new stdClass();
$type->type = trim($form_state['values']['type']);
$type->type = $form_state['values']['type'];
$type->name = trim($form_state['values']['name']);
// Work out what the type was before the user submitted this form
$old_type = trim($form_state['values']['old_type']);
$old_type = $form_state['values']['old_type'];
$types = node_type_get_names();
......@@ -337,7 +337,7 @@ function node_type_form_submit($form, &$form_state) {
$type = node_type_set_defaults();
$type->type = trim($form_state['values']['type']);
$type->type = $form_state['values']['type'];
$type->name = trim($form_state['values']['name']);
$type->orig_type = trim($form_state['values']['orig_type']);
$type->old_type = isset($form_state['values']['old_type']) ? $form_state['values']['old_type'] : $type->type;
......
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