? boost-5.patch
? boost-544636.patch
Index: boost.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.install,v
retrieving revision 1.2.2.1.2.3.2.26
diff -u -p -r1.2.2.1.2.3.2.26 boost.install
--- boost.install	6 Aug 2009 08:20:31 -0000	1.2.2.1.2.3.2.26
+++ boost.install	10 Aug 2009 07:28:43 -0000
@@ -59,27 +59,41 @@ function boost_requirements($phase) {
   $t = get_t();
   switch ($phase) {
     case 'runtime':
-      $cache_directory = variable_get('boost_file_path', boost_cache_directory(NULL, FALSE));
-      $htaccess = file_get_contents('.htaccess');
-      _boost_mkdir_p($cache_directory);
-      $root_file = file_put_contents($cache_directory . '/' . variable_get('boost_root_file', '.boost'), $cache_directory);
-
-      if ($cache_directory != boost_cache_directory(NULL, FALSE)) {
-        $requirements['boost'] = array(
-          'title'       => $t('Boost'),
-          'description' => $t('!url: is not set to the default(!default). ', array('!url' => l('Cache file path', 'admin/settings/performance'), '!default'    => boost_cache_directory(NULL, FALSE))),
-          'severity'    => REQUIREMENT_WARNING,
-          'value'       => $t('Cache path'),
-        );
+      $cache_directories = array();
+      $cache_directories[] = BOOST_FILE_PATH;
+      if (BOOST_GZIP) {
+        $cache_directories[] = BOOST_GZIP_FILE_PATH;
       }
-      elseif (!is_dir($cache_directory)) {
-        $requirements['boost'] = array(
-          'title'       => $t('Boost'),
-          'description' => $t('!cache_dir: does not exist.', array('!cache_dir' => $cache_directory)),
-          'severity'    => REQUIREMENT_ERROR,
-          'value'       => $t('Cache path'),
-        );
+      $htaccess = file_get_contents('.htaccess');
+      foreach($cache_directories as $cache_directory) {
+        $root_file = file_put_contents($cache_directory . '/' . variable_get('boost_root_file', '.boost'), $cache_directory);
+        _boost_mkdir_p($cache_directory);
+        if (!is_dir($cache_directory)) {
+          $requirements['boost'] = array(
+            'title'       => $t('Boost'),
+            'description' => $t('!cache_dir: does not exist.', array('!cache_dir' => $cache_directory)),
+            'severity'    => REQUIREMENT_ERROR,
+            'value'       => $t('Cache path'),
+          );
+        }
+        elseif (!$root_file || !is_writable($cache_directory)) {
+          $requirements['boost'] = array(
+            'title'       => $t('Boost'),
+            'description' => $t('Directory %dir credentials - Permissions: %fp. Owner %fo. Group %fg.<br /> Your credentials - Group ID: %gid. User ID: %uid. Current script owner: %user.', array('%dir' => getcwd() . '/' . $cache_directory, '%gid' => getmygid(), '%uid' => getmyuid(), '%user' => get_current_user(), '%fp' => substr(sprintf('%o', fileperms($cache_directory)), -4), '%fo' => fileowner($cache_directory), '%fg' => filegroup($cache_directory) )),
+            'severity'    => REQUIREMENT_ERROR,
+            'value'       => $t('Can not write to filesystem'),
+          );
+        }
       }
+      if (isset($requirements['boost'])) {}
+      elseif (BOOST_FILE_PATH != boost_cache_directory(NULL, FALSE)) {
+          $requirements['boost'] = array(
+            'title'       => $t('Boost'),
+            'description' => $t('!url: is not set to the default(!default). ', array('!url' => l('Cache file path', 'admin/settings/performance'), '!default'    => boost_cache_directory(NULL, FALSE))),
+            'severity'    => REQUIREMENT_WARNING,
+            'value'       => $t('Cache path'),
+          );
+        }
       elseif ($htaccess && count(explode("%{REQUEST_URI}_%{QUERY_STRING}\.html", $htaccess)) < 5) {
         $requirements['boost'] = array(
           'title'       => $t('Boost'),
@@ -88,14 +102,6 @@ function boost_requirements($phase) {
           'value'       => $t('.htaccess file'),
         );
       }
-      elseif (!$root_file || !is_writable($cache_directory)) {
-        $requirements['boost'] = array(
-          'title'       => $t('Boost'),
-          'description' => $t('Directory %dir credentials - Permissions: %fp. Owner %fo. Group %fg.<br /> Your credentials - Group ID: %gid. User ID: %uid. Current script owner: %user.', array('%dir' => getcwd() . '/' . $cache_directory, '%gid' => getmygid(), '%uid' => getmyuid(), '%user' => get_current_user(), '%fp' => substr(sprintf('%o', fileperms($cache_directory)), -4), '%fo' => fileowner($cache_directory), '%fg' => filegroup($cache_directory) )),
-          'severity'    => REQUIREMENT_ERROR,
-          'value'       => $t('Can not write to filesystem'),
-        );
-      }
       else {
         $requirements['boost'] = array(
           'title'       => $t('Boost'),
