Index: pathauto_node.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto_node.inc,v
retrieving revision 1.48
diff -u -r1.48 pathauto_node.inc
--- pathauto_node.inc	28 Jun 2008 15:41:15 -0000	1.48
+++ pathauto_node.inc	15 May 2009 03:04:05 -0000
@@ -40,6 +40,9 @@
         $languages = array();
       }
       foreach (node_get_types('names') as $node_type => $node_name) {
+        if ($node_type == 'book') {
+          $settings['patternitems']['book_root'] = t('Pattern for all root book page paths');
+        }
         if (variable_get('language_content_type_'. $node_type, 0) && count($languages)) {
           $settings['patternitems'][$node_type] = t('Default path pattern for @node_type (applies to all @node_type node types with blank patterns below)', array('@node_type' => $node_name));
           foreach ($languages as $lang_code => $lang_name) {
Index: pathauto.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.module,v
retrieving revision 1.124
diff -u -r1.124 pathauto.module
--- pathauto.module	20 Apr 2009 22:52:37 -0000	1.124
+++ pathauto.module	15 May 2009 03:04:05 -0000
@@ -219,6 +219,9 @@
         if (variable_get('language_content_type_'. $node->type, 0)) {
           $pattern = trim(variable_get('pathauto_node_'. $node->type .'_'. $node->language .'_pattern', FALSE));
         }
+        if (empty($pattern) && $node->type == 'book' && $node->book['plid'] == 0) {
+          $pattern = trim(variable_get('pathauto_node_book_root_pattern', FALSE));
+        }
         if (empty($pattern)) {
           $pattern = trim(variable_get('pathauto_node_'. $node->type .'_pattern', FALSE));
           if (empty($pattern)) {
Index: pathauto.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.inc,v
retrieving revision 1.51
diff -u -r1.51 pathauto.inc
--- pathauto.inc	21 Mar 2009 00:24:28 -0000	1.51
+++ pathauto.inc	15 May 2009 03:04:05 -0000
@@ -291,6 +291,10 @@
   // Retrieve and apply the pattern for this content type
   if (!empty($type)) {
     $pattern = trim(variable_get('pathauto_'. $module .'_'. $type .'_'. $language .'_pattern', ''));
+    $node = node_load($entity_id);
+    if (empty($pattern) && $node->type == 'book' && $node->book['plid'] == 0) {
+      $pattern = trim(variable_get('pathauto_node_book_root_pattern', FALSE));
+    }
     if (empty($pattern)) {
       $pattern = trim(variable_get('pathauto_'. $module .'_'. $type .'_pattern', ''));
     }
