Commit 8eefdd5b authored by webchick's avatar webchick

#609118 by plach, te-brian, David_Rothstein, yched: Fixed node.tokens.inc: node->body issues.

parent 2e125869
......@@ -138,14 +138,12 @@ function node_tokens($type, $tokens, array $data = array(), array $options = arr
break;
case 'body':
if (!empty($node->body)) {
$replacements[$original] = $sanitize ? $node->body[$node->language][0]['safe'] : $node->body[$node->language][0]['value'];
}
break;
case 'summary':
if (!empty($node->body)) {
$replacements[$original] = $sanitize ? $node->body[$node->language][0]['safe_summary'] : $node->body[$node->language][0]['summary'];
$item = $node->body[$node->language][0];
$column = ($name == 'body') ? 'value' : 'summary';
$instance = field_info_instance('node', 'body', $node->type);
$replacements[$original] = $sanitize ? _text_sanitize($instance, $node->language, $item, $column) : $item[$column];
}
break;
......
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