Commit c9a3fb38 authored by merlinofchaos's avatar merlinofchaos

#149276: (profix898) fix node body mishandling due to changes in Drupal 5 node rendering.

parent c757570f
......@@ -5,6 +5,9 @@ Views 5.x-1.6-dev
o #154272: (adrianr) Uncacheable queries did not get substitutions properly run on them.
o #146776: (Moxide) Unnecessary drupal_goto in views_ui_admin_confirm_form_submit removed.
o #142504: (mfrederickson) added proper is_null filter.
o #142347: (yhager) Fix Views losing the first taxonomy term on optional vocabularies.
o #147821: (TimK and gnassar) Fix broken filtering on full node with RSS feeds.
o #149276: (profix898) fix node body mishandling due to changes in Drupal 5 node rendering.
Views 5.x-1.6-beta5
Bugs fixed:
......
......@@ -460,6 +460,21 @@ function views_handler_field_body($fieldinfo, $fielddata, $value, $data) {
}
// Allow modules to change $node->body before viewing.
node_invoke_nodeapi($node, 'view', $teaser, TRUE);
// Set the proper node part, then unset unused $node part so that a bad
// theme can not open a security hole.
$content = drupal_render($node->content);
if ($teaser) {
$node->teaser = $content;
unset($node->body);
}
else {
$node->body = $content;
unset($node->teaser);
}
// Allow modules to modify the fully-built node.
node_invoke_nodeapi($node, 'alter', $teaser, $page);
return $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