? boost-480182.1.patch
? boost-480182.2.patch
? boost-480182.patch
Index: boost.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.admin.inc,v
retrieving revision 1.1.2.1.2.3.2.21
diff -u -p -r1.1.2.1.2.3.2.21 boost.admin.inc
--- boost.admin.inc	4 Jun 2009 08:36:02 -0000	1.1.2.1.2.3.2.21
+++ boost.admin.inc	4 Jun 2009 10:51:52 -0000
@@ -264,7 +264,7 @@ $drupal_subdir = rtrim($base_path, '/');
 
   # Skip boost IF not get request OR uri has wrong dir OR cookie is set
   RewriteCond %{REQUEST_METHOD} !^GET$ [OR]
-  RewriteCond %{REQUEST_URI} ^$drupal_subdir(/admin|/$cache_dir|/misc|/modules|/sites|/system|/themes|/user/login) [OR]
+  RewriteCond %{REQUEST_URI} (^$drupal_subdir(admin|cache|misc|modules|sites|system|themes))|(/(feed|comment/reply|user|user/(login|password|register))$) [OR]
   RewriteCond %{HTTP_COOKIE} DRUPAL_UID
   RewriteRule .* - [S=2]
 
Index: boost.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.module,v
retrieving revision 1.3.2.2.2.5.2.46
diff -u -p -r1.3.2.2.2.5.2.46 boost.module
--- boost.module	4 Jun 2009 09:07:51 -0000	1.3.2.2.2.5.2.46
+++ boost.module	4 Jun 2009 10:51:52 -0000
@@ -28,7 +28,6 @@ define('BOOST_GZIP_FILE_PATH',       str
 define('BOOST_CLEAR_CACHE_OFFLINE',  variable_get('boost_clear_cache_offline', TRUE));
 define('BOOST_HALT_ON_ERRORS',       variable_get('boost_halt_on_errors', TRUE));
 
-
 // This cookie is set for all authenticated users, so that they can be
 // excluded from caching (or in the future get a user-specific cached page):
 define('BOOST_COOKIE',               variable_get('boost_cookie', 'DRUPAL_UID'));
@@ -67,7 +66,7 @@ function boost_help($path, $arg) {
 function boost_init() {
   global $user, $base_path;
   //set variables
-  $GLOBALS['_boost_path'] = ($base_path != '/') ? ltrim($base_path, '/') . $_REQUEST['q'] : $_REQUEST['q'];
+  $GLOBALS['_boost_path'] = $_REQUEST['q'];
   // Make the proper filename for our query
   $GLOBALS['_boost_query'] = '_';
   foreach ($_GET as $key => $val) {
@@ -460,7 +459,7 @@ function boost_is_cacheable($path) {
     return FALSE;
 
   // Don't cache comment reply pages
-  if (preg_match('!^comment/reply!', $normal_path))
+  if (preg_match('!comment/reply$!', $normal_path))
     return FALSE;
 
   // Match the user's cacheability settings against the path
@@ -644,13 +643,16 @@ function boost_cache_directory($host = N
   global $base_url;
   if ($base_url == "http://") {
     watchdog('boost', 'base_url is not set in your settings.php file. Please read #7 in boosts INSTALL.txt file.', array(), WATCHDOG_NOTICE);
-    $base_url = $base_url . str_replace(BOOST_ROOT_CACHE_PATH . '/', '', variable_get('boost_file_path', boost_cache_directory(NULL, FALSE)));
+    if (!BOOST_MULTISITE_SINGLE_DB) {
+      $base_url = $base_url . str_replace(BOOST_ROOT_CACHE_PATH . '/', '', variable_get('boost_file_path', boost_cache_directory(NULL, FALSE)));
+    }
   }
   $parts = parse_url($base_url);
   $host = !empty($host) ? $host : $parts['host'];
+  $parts['path'] = isset($parts['path']) ? $parts['path'] : '/';
+  $subdir = implode('/', array_filter(explode('/', (!empty($base_path)) ? $base_path : $parts['path'])));
 
-  // FIXME: correctly handle Drupal subdirectory installations.
-  return implode('/', !$absolute ? array(BOOST_ROOT_CACHE_PATH, $host) : array(getcwd(), BOOST_ROOT_CACHE_PATH, $host));
+  return implode('/', !$absolute ? array_filter(array('cache', $host, $subdir)) : array_filter(array(getcwd(), 'cache', $host, $subdir)));
 }
 
 /**
Index: htaccess/boosted1.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/htaccess/Attic/boosted1.txt,v
retrieving revision 1.1.2.5
diff -u -p -r1.1.2.5 boosted1.txt
--- htaccess/boosted1.txt	30 May 2009 20:55:56 -0000	1.1.2.5
+++ htaccess/boosted1.txt	4 Jun 2009 10:51:52 -0000
@@ -19,7 +19,7 @@
 
   #skip boost IF not get request OR uri has wrong dir OR cookie is set OR cache dir doesn't exist
   RewriteCond %{REQUEST_METHOD} !^GET$ [OR]
-  RewriteCond %{REQUEST_URI} ^(/admin|/cache|/misc|/modules|/sites|/system|/themes|/user/login) [OR]
+  RewriteCond %{REQUEST_URI} (^/(admin|cache|misc|modules|sites|system|themes))|(/(feed|comment/reply|user|user/(login|password|register))$) [OR]
   RewriteCond %{HTTP_COOKIE} DRUPAL_UID [OR]
   RewriteCond %{DOCUMENT_ROOT}/cache/%{SERVER_NAME} !-d
   RewriteRule .* - [S=2]
Index: htaccess/boosted2.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/htaccess/Attic/boosted2.txt,v
retrieving revision 1.1.2.6
diff -u -p -r1.1.2.6 boosted2.txt
--- htaccess/boosted2.txt	30 May 2009 21:05:43 -0000	1.1.2.6
+++ htaccess/boosted2.txt	4 Jun 2009 10:51:52 -0000
@@ -19,7 +19,7 @@
 
   #skip boost IF not get request OR uri has wrong dir OR cookie is set OR cache dir doesn't exist
   RewriteCond %{REQUEST_METHOD} !^GET$ [OR]
-  RewriteCond %{REQUEST_URI} ^(/admin|/cache|/misc|/modules|/sites|/system|/themes|/user/login) [OR]
+  RewriteCond %{REQUEST_URI} (^/(admin|cache|misc|modules|sites|system|themes))|(/(feed|comment/reply|user|user/(login|password|register))$) [OR]
   RewriteCond %{HTTP_COOKIE} DRUPAL_UID [OR]
   RewriteCond %{DOCUMENT_ROOT}/cache/%{HTTP_HOST} !-d
   RewriteRule .* - [S=2]
