Index: README.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/subdomain/README.txt,v
retrieving revision 1.3.2.4
diff -u -p -r1.3.2.4 README.txt
--- README.txt	20 Aug 2008 05:22:03 -0000	1.3.2.4
+++ README.txt	24 Jul 2009 21:24:04 -0000
@@ -49,40 +49,20 @@ are upgrading from a previous version, e
 ===========================================================
 INSTALL
 ===========================================================
-STEP 1: Copy and paste the following to the bottom of your settings.php file
 
-  // ------------- BEGIN COPYING BELOW THIS LINE -------------
-  function custom_url_rewrite_outbound(&$path, &$options, $original_path) {
-
-    // Used by the Subdomain module to generate URLs with subdomains
-    if (module_exists('subdomain')) {
-      subdomain_url_rewrite_outbound($path, $options); 
-    }
-  }
-
-  function custom_url_rewrite_inbound(&$result, $path, $path_language) {
-
-    // Used by the Subdomain module to correctly interpret URLs with subdomains
-    if (module_exists('subdomain')) {
-      subdomain_url_rewrite_inbound($result, $path, $path_language); 
-    }
-  }  
-  // ----------------- COPY UNTIL THIS LINE ------------------
-
-
-STEP 2: Edit settings.php & set $cookie_domain to your site domain. e.g.:
+STEP 1: Edit settings.php & set $cookie_domain to your site domain. e.g.:
  $cookie_domain = "example.com";
 
-STEP 3: Enable wildcard DNS on your DNS hosting provider (e.g. *.example.com)
+STEP 2: Enable wildcard DNS on your DNS hosting provider (e.g. *.example.com)
 
-STEP 4: Configure wildcard virtual hosts. For apache or lighttpd,
+STEP 3: Configure wildcard virtual hosts. For apache or lighttpd,
  see below. For other web servers, consult their documentation.
 
-STEP 5: Enable Subdomain settings (URL aliases -> Subdomain settings
+STEP 4: Enable Subdomain settings (URL aliases -> Subdomain settings
  select mode (og, node author, taxonomy vocabulary)
  and additional settings as desired
 
-STEP 6: Configure Pathauto (URL aliases -> Automated alias settings):
+STEP 5: Configure Pathauto (URL aliases -> Automated alias settings):
  1) Go to "Punctuation Settings" and set "Tilde ~:" to "No action"
  2) Place [subdomain] at the *start* of all paths whose content you
     want placed on a subdomain
@@ -138,4 +118,4 @@ url.rewrite-final = (
 ===========================================================
 CREDITS
 ===========================================================
-Authored and maintained by Stein Setvik <setvik AT gmail DOT com>
\ No newline at end of file
+Authored and maintained by Stein Setvik <setvik AT gmail DOT com>
Index: subdomain.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/subdomain/subdomain.module,v
retrieving revision 1.4.2.12
diff -u -p -r1.4.2.12 subdomain.module
--- subdomain.module	18 Mar 2009 12:53:37 -0000	1.4.2.12
+++ subdomain.module	24 Jul 2009 21:24:05 -0000
@@ -360,9 +360,20 @@ function subdomain_base_domain() {
 }
 
 /**
+ * Define custom_url_rewrite_inbound() if the url_alter.module is not enabled.
+ */
+if (!function_exists('custom_url_rewrite_inbound')) {
+  function custom_url_rewrite_inbound(&$result, $path, $path_language) {
+    subdomain_url_alter_inbound($result, $path, $path_language);
+  }
+}
+
+/**
+ * Implemention of hook_url_alter_inbound().
+ *
  * If host includes subdomain, rewrite URI and lookup internal path
  */
-function subdomain_url_rewrite_inbound(&$result, $path, $path_language) {
+function subdomain_url_alter_inbound(&$result, $path, $path_language) {
   global $cookie_domain;
   static $executed = FALSE;
 
@@ -404,9 +415,20 @@ function subdomain_url_rewrite_inbound(&
 }
 
 /**
+ * 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) {
+    subdomain_url_alter_outbound($path, $options, $original_path);
+  }
+}
+
+/**
+ * Implementation of hook_url_alter_outbound().
+ *
  * Looks for subdomain token in Drupal generated URLs; if present, prepends to domain
  */
-function subdomain_url_rewrite_outbound(&$path, &$options) {
+function subdomain_url_alter_outbound(&$path, &$options, $original_path) {
   $options['absolute'] = TRUE;
 
   if (substr($path, 0, SUBDOMAIN_TOKEN_PREFIX_LENGTH) == SUBDOMAIN_TOKEN_PREFIX) {
@@ -452,4 +474,4 @@ function _subdomain_get_protocol(){
   } else { 
     return 'http://';
   }
-}
\ No newline at end of file
+}
