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

Part of #11280: node_preview() should only generate a teaser if none is...

Part of #11280: node_preview() should only generate a teaser if none is present (e.g. provided by a module like excerpt.module).
parent 86b8465c
......@@ -1330,8 +1330,11 @@ function node_preview($node) {
}
$node->changed = time();
// Extract a teaser:
// Extract a teaser, 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);
}
// Display a preview of the node:
if ($node->teaser && $node->teaser != $node->body) {
......
......@@ -1330,8 +1330,11 @@ function node_preview($node) {
}
$node->changed = time();
// Extract a teaser:
// Extract a teaser, 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);
}
// Display a preview of the node:
if ($node->teaser && $node->teaser != $node->body) {
......
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