Index: bandwidth.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/bandwidth/bandwidth.module,v
retrieving revision 1.4
diff -u -p -r1.4 bandwidth.module
--- bandwidth.module	5 Nov 2008 18:25:04 -0000	1.4
+++ bandwidth.module	24 Jul 2009 21:12:08 -0000
@@ -217,11 +217,18 @@ function bandwidth_user($op, &$edit, &$a
 }
 
 /**
- * Pluggable Drupal function
+ * 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_path) {
+    bandwidth_url_alter_outbound($path, $options, $original_path);
+  }
+}
 
-function custom_url_rewrite_outbound(&$path, &$options, $original_path)
-{
+/**
+ * Implement hook_url_alter_outbound().
+ */
+function bandwidth_url_alter_outbound(&$path, &$options, $original_path) {
   // If it is a link to change bandwidth (changeBandwidth argument in the query)
   // We alter the link and clear the query
   if (strstr($options['query'], 'changeBandwidth=')) {
@@ -252,4 +259,4 @@ function theme_bandwidth_choice($path) {
     $bandwidthes[] = l($value,$path,array("query" => array('changeBandwidth' => $key)));
   }
   return theme_item_list($bandwidthes);
-}
\ No newline at end of file
+}
