? .DS_Store
? book_body_display.patch
? themes/.DS_Store
? themes/engines/.DS_Store
? themes/engines/phptemplate/.DS_Store
? themes/garland/.DS_Store
? themes/garland/color/.DS_Store
Index: modules/book/book.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.module,v
retrieving revision 1.403
diff -u -p -r1.403 book.module
--- modules/book/book.module	30 Nov 2006 02:04:31 -0000	1.403
+++ modules/book/book.module	24 Dec 2006 05:24:04 -0000
@@ -778,19 +778,12 @@ function book_recurse($nid = 0, $depth =
  *   - the HTML generated for the given node.
  */
 function book_node_visitor_html_pre($node, $depth, $nid) {
-  // Output the content:
-  if (node_hook($node, 'content')) {
-    $node = node_invoke($node, 'content');
-  }
-  // Allow modules to change $node->body before viewing.
-  node_invoke_nodeapi($node, 'print', $node->body, FALSE);
+  $node = node_build_content($node, FALSE, FALSE, 'print')
 
   $output .= "<div id=\"node-". $node->nid ."\" class=\"section-$depth\">\n";
   $output .= "<h1 class=\"book-heading\">". check_plain($node->title) ."</h1>\n";
+  $output .= drupal_render($node->content);
 
-  if ($node->body) {
-    $output .= drupal_render($node->content);
-  }
   return $output;
 }
 
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.758
diff -u -p -r1.758 node.module
--- modules/node/node.module	23 Dec 2006 17:49:47 -0000	1.758
+++ modules/node/node.module	24 Dec 2006 05:24:06 -0000
@@ -731,12 +731,16 @@ function node_prepare($node, $teaser = F
  *   Whether to display the teaser only, as on the main page.
  * @param $page
  *   Whether the node is being displayed by itself as a page.
+ * @param $op
+ *   An optional nodeapi operation to trigger in place of the
+ *   default 'view'. This is useful when generating print-friendly
+ *   pages rather than the normal on-screen versions of a node.
  *
  * @return
  *   An structured array containing the individual elements
  *   of the node's body.
  */
-function node_build_content($node, $teaser = FALSE, $page = FALSE) {
+function node_build_content($node, $teaser = FALSE, $page = FALSE, $op = 'view') {
   // Remove the delimiter (if any) that separates the teaser from the body.
   $node->body = str_replace('<break>', '', $node->body);
 
@@ -750,7 +754,7 @@ function node_build_content($node, $teas
   }
 
   // Allow modules to make their own additions to the node.
-  node_invoke_nodeapi($node, 'view', $teaser, $page);
+  node_invoke_nodeapi($node, $op, $teaser, $page);
 
   return $node;
 }
