diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-02-03 19:07:32 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-02-03 19:07:32 +0000 |
commit | a00792f9effd4c6c9b870d56bb50c33fb1b5d3c8 (patch) | |
tree | 2b988796a1f4ed2409f95df79cb7466ab2d28e29 /modules/node/node.module | |
parent | 17e3d1fcddf240956d6367243e976f50ef1ad16d (diff) | |
download | brdo-a00792f9effd4c6c9b870d56bb50c33fb1b5d3c8.tar.gz brdo-a00792f9effd4c6c9b870d56bb50c33fb1b5d3c8.tar.bz2 |
#216890 by gpk with documentation from myself: blog API clients do not pass on the teaser_include flag, so only act on that flag, if we have it
Diffstat (limited to 'modules/node/node.module')
-rw-r--r-- | modules/node/node.module | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index dd220267b..ef798cf0a 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -823,8 +823,10 @@ function node_submit($node) { if (!isset($node->teaser)) { if (isset($node->body)) { $node->teaser = node_teaser($node->body, isset($node->format) ? $node->format : NULL); - // Chop off the teaser from the body if needed. - if (empty($node->teaser_include) && $node->teaser == substr($node->body, 0, strlen($node->teaser))) { + // Chop off the teaser from the body if needed. The teaser_include + // property might not be set (eg. in Blog API postings), so only act on + // it, if it was set with a given value. + if (isset($node->teaser_include) && !$node->teaser_include && $node->teaser == substr($node->body, 0, strlen($node->teaser))) { $node->body = substr($node->body, strlen($node->teaser)); } } |