? .svn
? fix_phptemplate_links_name_collision.patch
Index: menutrails.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/menutrails/menutrails.module,v
retrieving revision 1.22
diff -u -p -r1.22 menutrails.module
--- menutrails.module	17 Aug 2009 16:37:50 -0000	1.22
+++ menutrails.module	7 Nov 2009 02:18:45 -0000
@@ -411,6 +411,36 @@ function _menutrails_recurse($tree, $hre
 }
 
 /**
+ * Implementation of hook_views_pre_view().
+ *
+ * This is invoked for every view before the it is themed, even if the view is
+ * cached.
+ */
+function menutrails_views_pre_view(&$view) {
+  if ($view->display_handler->display->display_plugin == 'page') {
+    drupal_set_breadcrumb(menutrails_get_breadcrumbs());
+  }
+}
+
+/**
+ * Implementation of hook_theme_registry_alter().
+ * 
+ * Massage the theme registry, and only alter theme_links into menutrails_links 
+ * in case the theme system didn't detect another theme override function.
+ */
+function menutrails_theme_registry_alter(&$theme_registry) {
+  if ($theme_registry['links']['function'] == 'theme_links') {
+    $theme_registry['links'] = array(
+      'function' => 'menutrails_links',
+      'arguments' => array(
+          'links' => NULL,
+          'attributes' => array('class' => 'links'),
+      ),
+    );
+  }
+}
+
+/**
  * Return a themed set of links.
  *
  * The important difference is that we use the in_active_trail bit here to set
@@ -425,7 +455,7 @@ function _menutrails_recurse($tree, $hre
  * @return
  *   A string containing an unordered list of links.
  */
-function phptemplate_links($links, $attributes = array('class' => 'links')) {
+function menutrails_links($links, $attributes = array('class' => 'links')) {
   global $language;
   $output = '';
 
@@ -483,17 +513,4 @@ function phptemplate_links($links, $attr
   }
 
   return $output;
-}
-
-/**
- * Implementation of hook_views_pre_view().
- *
- * This is invoked for every view before the it is themed, even if the view is
- * cached.
- */
-function menutrails_views_pre_view(&$view) {
-  if ($view->display_handler->display->display_plugin == 'page') {
-    drupal_set_breadcrumb(menutrails_get_breadcrumbs());
-  }
-}
-
+}
\ No newline at end of file
