Index: purl.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/purl/purl.module,v
retrieving revision 1.1.2.12
diff -u -p -r1.1.2.12 purl.module
--- purl.module	6 Jul 2009 05:35:45 -0000	1.1.2.12
+++ purl.module	24 Jul 2009 21:34:39 -0000
@@ -128,16 +128,6 @@ function _purl_init($method) {
 }
 
 /**
- * Check that no one else has implemented the custom_url_rewrite function --
- * if available, use PURL.
- */
-if (!function_exists('custom_url_rewrite_outbound')) {
-  function custom_url_rewrite_outbound(&$path, &$options, $original) {
-    return purl_url_rewrite($path, $options, $original);
-  }
-}
-
-/**
  * Taken from i18n
  */
 function _purl_get_normal_path($path) {
@@ -155,6 +145,17 @@ function _purl_get_normal_path($path) {
 }
 
 /**
+ * Define custom_url_rewrite_outbound() if the url_alter.module is not enabled.
+ */
+if (!function_exists('custom_url_rewrite_outbound')) {
+  function custom_url_rewrite_outbound(&$path, &$options, $original) {
+    return purl_url_alter_outbound($path, $options, $original);
+  }
+}
+
+/**
+ * Implementation of hook_url_alter_outbound().
+ *
  * Rewrites path with the current modifier and removes the modifier if
  * searching for source path.
  *
@@ -172,7 +173,7 @@ function _purl_get_normal_path($path) {
  *    together to add a specific modification to the link.
  *
  */
-function purl_url_rewrite(&$path, &$options, $original) {
+function purl_url_alter_outbound(&$path, &$options, $original) {
   static $global_elements;
 
   // Check to see whether url rewriting has been disabled or isn't
