? better_warnings_191393.patch
? bookpathalias_144366.patch
? only_alias_blogabble_bloggers_83993.patch
Index: pathauto.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.module,v
retrieving revision 1.44.4.48
diff -u -p -r1.44.4.48 pathauto.module
--- pathauto.module	12 Nov 2007 13:59:39 -0000	1.44.4.48
+++ pathauto.module	13 Nov 2007 15:57:54 -0000
@@ -37,7 +37,6 @@ function pathauto_perm() {
  * Implementation of hook_menu
  */
 function pathauto_menu($may_cache) {
-  
   $items = array();
   if ($may_cache) {
     $items[] = array(
@@ -382,6 +381,16 @@ function pathauto_token_values($type, $o
           $category->vid = $vid;
           // In the realm of nodes these are terms, in the realm of Taxonomy, cats
           $label = 'term';
+
+          // We're on a node and it's a book and it has a parent?  Get the book path alias
+          if (module_exists('book')) {
+            if ($object->type == 'book' && $object->parent) {
+              $values['bookpathalias'] = drupal_get_path_alias('node/'. $object->parent);
+            }
+            else {
+              $values['bookpathalias'] = '';
+            }
+          }
           
         case 'taxonomy':
         default:
@@ -443,6 +452,11 @@ function pathauto_token_list($type = 'al
       $tokens['node']['termalias'] = t("URL alias for the term.");
     }
   }
+  if (module_exists('book')) {
+    if ($type == 'node' || $type == 'all') {
+      $tokens['node']['bookpathalias'] = t("URL alias for the parent book.");
+    }    
+  }
   return $tokens;
 }
 
