#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
parent
17e3d1fcdd
commit
a00792f9ef
|
@ -823,8 +823,10 @@ function node_submit($node) {
|
||||||
if (!isset($node->teaser)) {
|
if (!isset($node->teaser)) {
|
||||||
if (isset($node->body)) {
|
if (isset($node->body)) {
|
||||||
$node->teaser = node_teaser($node->body, isset($node->format) ? $node->format : NULL);
|
$node->teaser = node_teaser($node->body, isset($node->format) ? $node->format : NULL);
|
||||||
// Chop off the teaser from the body if needed.
|
// Chop off the teaser from the body if needed. The teaser_include
|
||||||
if (empty($node->teaser_include) && $node->teaser == substr($node->body, 0, strlen($node->teaser))) {
|
// 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));
|
$node->body = substr($node->body, strlen($node->teaser));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue