--- book.module.orig	2005-04-19 15:44:36.000000000 -0700
+++ book.module	2005-04-19 15:43:48.000000000 -0700
@@ -149,7 +149,7 @@
         }
 
         $block['subject'] = check_plain($path[0]->title);
-        $block['content'] = book_tree($expand[0], 5, $expand);
+        $block['content'] = book_tree($expand[0], 5, $expand, TRUE);
       }
     }
 
@@ -575,17 +575,28 @@
   return $output;
 }
 
-function book_tree($parent = 0, $depth = 3, $unfold = array()) {
+function book_tree($parent = 0, $depth = 3, $unfold = array(), $include_parent = FALSE) {
   $result = db_query(db_rewrite_sql('SELECT n.nid, n.title, b.parent, b.weight FROM {node} n INNER JOIN {book} b ON n.nid = b.nid WHERE n.status = 1 AND n.moderate = 0 ORDER BY b.weight, n.title'));
 
+  $content = '<div class="menu"><ul>';
   while ($node = db_fetch_object($result)) {
     $list = $children[$node->parent] ? $children[$node->parent] : array();
     array_push($list, $node);
     $children[$node->parent] = $list;
+
+    if ($include_parent && $node->nid == $parent) {
+      $content .= '<li class="expanded">';
+      $content .= l($node->title, 'node/'. $node->nid);
+      $content .= '<ul>';
+    }
   }
 
   if ($tree = book_tree_recurse($parent, $depth, $children, $unfold)) {
-    return '<div class="menu"><ul>'. $tree .'</ul></div>'; 
+    $content .= $tree .'</ul>';
+    if ($include_parent) {
+      $content .= '</li></ul>';
+    }
+    return $content . '</div>';
   }
 }
 
