? install.patch
? domain_prefix/445386-sql.patch
? domain_theme/303406-theme-settings.patch
Index: INSTALL.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/INSTALL.txt,v
retrieving revision 1.19
diff -u -p -r1.19 INSTALL.txt
--- INSTALL.txt	23 Mar 2009 15:09:14 -0000	1.19
+++ INSTALL.txt	24 May 2009 22:48:15 -0000
@@ -101,9 +101,9 @@ server.  For more information, see:
 After you have enabled multiple DNS entries to resolve to your Drupal
 installation, you may activate the module and configure its settings.
 
-NOTE: No matter how many domains resolve to the same IP, you only need one instance
-of Drupal's settings.php file.  The sites folder should be named 'default' or
-named for your primary domain.
+NOTE: No matter how many domains resolve to the same IP, you only need one
+instance of Drupal's settings.php file.  The sites folder should be named
+'default' or named for your primary domain.
 
 ----
 2.3 Setting DOMAIN_INSTALL_RULE
@@ -277,15 +277,15 @@ include './sites/all/modules/domain/sett
 ----
 4.4.3 Option 2
 
-If you are having difficulty determining the correct path, copy the following files
-into your settings folder.
+If you are having difficulty determining the correct path, copy the following
+files into your settings folder.
 
   domain > domain.bootstrap.inc
   domain > settings.inc
   domain > settings_custom_url.inc
 
-The files should be in the same directory as your active settings.php file.  Then
-add the following lines:
+The files should be in the same directory as your active settings.php file.
+Then add the following lines:
 
 ====
 /**
@@ -320,16 +320,44 @@ into your settings.php file.
 ----
 4.5 custom_url_rewrite_outbound()
 
+custom_url_rewrite_outbound() is a special function that you can add
+to settings.php to alter how Drupal writes links to content.
+
 Domain Access implements this function inside its settings.inc file.
-Domain Access has not been tested with other uses of 
-custom_url_rewrite_outbound().
 
-If your site currently implements this function, you will need to make custom
-edits to your current file.  Either move the function from domain/settings.inc
-into your current function, or vice versa.
+If your site already uses this function -- it is not in core -- then you will
+need to modify its use to accommodate Domain Access because the 
+module has its own version.
+
+Domain Access loads its version of this function automatically if
+it does not already exist. If it does exist, you need to decide which
+version should run first, and then add something like the following
+code to settings.php _below_ the lines from step 4.4:
+
+====
+/**
+ * Both Drupal for Facebook and domain module use the
+ * custom_url_rewrite feature.  We have to define our own functions
+ * which call the others in the proper order.
+ */
+function custom_url_rewrite_outbound(&$result, $path, $path_language) {
+  // Call fb module first
+  if (function_exists('fb_settings_url_rewrite_outbound')) {
+    fb_settings_url_rewrite_outbound($result, $path, $path_language);
+  }
+  if (function_exists('domain_url_rewrite_outbound')) {
+    domain_url_rewrite_outbound($result, $path, $path_language);
+  }
+}
+====
+
+You may need to experiment with the order in which you call these functions.
+
+NOTE: Domain Access does not use custom_url_rewrite_inbound().
 
 For more information, see
   http://api.drupal.org/api/function/custom_url_rewrite_outbound/6
+  http://drupal.org/node/450344
 
 ----
 5.  Additional Module Installation
Index: INSTALL_QUICKSTART.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/domain/INSTALL_QUICKSTART.txt,v
retrieving revision 1.6
diff -u -p -r1.6 INSTALL_QUICKSTART.txt
--- INSTALL_QUICKSTART.txt	20 Feb 2009 20:31:08 -0000	1.6
+++ INSTALL_QUICKSTART.txt	24 May 2009 22:48:15 -0000
@@ -23,19 +23,7 @@ INSTALLATION INSTRUCTIONS
 
       'sites/all/modules'
 
-3. Check for existing custom_url_rewrite_outbound().
-
-    custom_url_rewrite_outbound() is a special function that you
-    can add to settings.php to alter how Drupal writes links to content.
-    
-    If your site already uses this function -- it is not in core -- then
-    you will receive a PHP fatal error. This is because Domain Access
-    uses a version of this function as well.
-    
-    If you encounter this conflict, you need to merge the logic of the
-    two functions into a single function.
-
-4. Add the following four lines of code to your settings.php file:
+3. Add the following four lines of code to your settings.php file:
 
 /**
  * Add the domain module setup routine.
@@ -49,6 +37,38 @@ include './sites/all/modules/domain/sett
     $db_url. Normally, you should add these lines to the end of the
     settings.php file.
 
+4. Check for existing custom_url_rewrite_outbound().
+
+    custom_url_rewrite_outbound() is a special function that you
+    can add to settings.php to alter how Drupal writes links to content.
+
+    If your site already uses this function -- it is not in core -- then
+    you will need to modify its use to accommodate Domain Access
+    because the module has its own version.
+
+    Domain Access loads its version of this function automatically if
+    it does not already exist. If it does exist, you need to decide which
+    version should run first, and then add something like the following
+    code to settings.php _below_ the lines from step 3:
+
+/**
+ * Both Drupal for Facebook and domain module use the
+ * custom_url_rewrite feature.  We have to define our own functions
+ * which call the others in the proper order.
+ */
+function custom_url_rewrite_outbound(&$result, $path, $path_language) {
+  // Call fb module first
+  if (function_exists('fb_settings_url_rewrite_outbound')) {
+    fb_settings_url_rewrite_outbound($result, $path, $path_language);
+  }
+  if (function_exists('domain_url_rewrite_outbound')) {
+    domain_url_rewrite_outbound($result, $path, $path_language);
+  }
+}
+
+    NOTE: Domain Access does not use custom_url_rewrite_inbound().
+
+
 5. Go to Admin > Build > Modules.  Therre you will see the Domain
     module group.
 
