Commit 581ea2c4 authored by Dries's avatar Dries

- Patch #15948 by matteo: the book module should call the nodeapi hook when...

- Patch #15948 by matteo: the book module should call the nodeapi hook when printing printer-friendly pages.
parent a92e93e5
......@@ -620,6 +620,9 @@ function book_print($nid = 0, $depth = 1) {
if (node_hook($node, 'content')) {
$node = node_invoke($node, 'content');
}
// Allow modules to change $node->body before viewing.
node_invoke_nodeapi($node, 'view', $node->body, false);
$output .= '<h1 id="'. $node->nid .'" name="'. $node->nid .'" class="book-h'. $depth .'">'. $node->title .'</h1>';
if ($node->body) {
......@@ -655,6 +658,9 @@ function book_print_recurse($parent = '', $depth = 1) {
if (node_hook($node, 'content')) {
$node = node_invoke($node, 'content');
}
// Allow modules to change $node->body before viewing.
node_invoke_nodeapi($node, 'view', $node->body, false);
$output .= '<h1 id="'. $node->nid .'" name="'. $node->nid .'" class="book-h'. $depth .'">'. $node->title .'</h1>';
if ($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