Commit c76d5db8 authored by Steven Wittens's avatar Steven Wittens
Browse files

Node.module: teaser autogeneration should not overwrite user/module-supplied teaser data.

(makes excerpt.module possible)
parent 55f5bd85
......@@ -1044,8 +1044,11 @@ function node_validate($node) {
}
}
// By default, auto-generate the teaser.
$node->teaser = node_teaser($node->body);
// Auto-generate the teaser, but only if it hasn't been set (e.g. by a
// module-provided 'teaser' form item).
if (!isset($node->teaser)) {
$node->teaser = node_teaser($node->body);
}
// Create a new revision when required.
$node = node_revision_create($node);
......
......@@ -1044,8 +1044,11 @@ function node_validate($node) {
}
}
// By default, auto-generate the teaser.
$node->teaser = node_teaser($node->body);
// Auto-generate the teaser, but only if it hasn't been set (e.g. by a
// module-provided 'teaser' form item).
if (!isset($node->teaser)) {
$node->teaser = node_teaser($node->body);
}
// Create a new revision when required.
$node = node_revision_create($node);
......
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