summaryrefslogtreecommitdiff
path: root/modules/node.module
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2004-10-04 20:34:23 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2004-10-04 20:34:23 +0000
commitdbead89c1fd190b0ca40cc280384d4f1cff8b0b4 (patch)
tree7c4dbd4141b3f161ebbdd570b152e18f837ad37d /modules/node.module
parent86b8465ca8117e10bddbdc6547bb8d63a68ef840 (diff)
downloadbrdo-dbead89c1fd190b0ca40cc280384d4f1cff8b0b4.tar.gz
brdo-dbead89c1fd190b0ca40cc280384d4f1cff8b0b4.tar.bz2
Part of #11280: node_preview() should only generate a teaser if none is present (e.g. provided by a module like excerpt.module).
Diffstat (limited to 'modules/node.module')
-rw-r--r--modules/node.module7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/node.module b/modules/node.module
index c3812f963..7a54a8ee7 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -1330,8 +1330,11 @@ function node_preview($node) {
}
$node->changed = time();
- // Extract a teaser:
- $node->teaser = node_teaser($node->body);
+ // 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) {