summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGábor Hojtsy2007-09-09 19:52:29 (GMT)
committerGábor Hojtsy2007-09-09 19:52:29 (GMT)
commite1022123bb393e93f3686257c3b630c31061c363 (patch)
treeb546bb923acbe3d1c548784ad9b4cf8bbaa8dff4
parent470b2e374e59abb186b2c806b1542ca0ebf0ad8c (diff)
#173995 by Desbeers: when creating a new node, default values are inserted into the object on preview, overwriting existing user provided values
-rw-r--r--modules/node/node.pages.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/node/node.pages.inc b/modules/node/node.pages.inc
index 32f53f5..fb1a37a 100644
--- a/modules/node/node.pages.inc
+++ b/modules/node/node.pages.inc
@@ -107,7 +107,9 @@ function node_form(&$form_state, $node) {
$node->$key = NULL;
}
}
- node_object_prepare($node);
+ if (!isset($form_state['node_preview'])) {
+ node_object_prepare($node);
+ }
// Set the id of the top-level form tag
$form['#id'] = 'node-form';