? boost-564042.patch
? boost_language_negotiation.diff
Index: boost.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.install,v
retrieving revision 1.2.2.1.2.3.2.32
diff -u -p -r1.2.2.1.2.3.2.32 boost.install
--- boost.install	30 Aug 2009 08:39:15 -0000	1.2.2.1.2.3.2.32
+++ boost.install	31 Aug 2009 03:27:07 -0000
@@ -70,15 +70,15 @@ function boost_requirements($phase) {
         _boost_mkdir_p($cache_directory);
         $root_file = file_put_contents($cache_directory . '/' . variable_get('boost_root_file', '.boost'), $cache_directory);
         if (!is_dir($cache_directory)) {
-          $requirements['boost'] = array(
+          $requirements['boost_default'] = 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(
+        if (!$root_file || !is_writable($cache_directory)) {
+          $requirements['boost_permissions'] = 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,
@@ -86,36 +86,49 @@ function boost_requirements($phase) {
           );
         }
       }
-      if (isset($requirements['boost'])) {}
-      elseif (BOOST_FILE_PATH != boost_cache_directory(NULL, FALSE)) {
-          $requirements['boost'] = array(
+      if (BOOST_FILE_PATH != boost_cache_directory(NULL, FALSE)) {
+          $requirements['boost_dir_exists'] = array(
             'title'       => $t('Boost'),
             'description' => $t('<a href="@url">Cache file path</a>: is not set to the default(!default). ', array('@url' => url('admin/settings/performance/boost#edit-boost-file-path'), '!default'    => boost_cache_directory(NULL, FALSE))),
             'severity'    => REQUIREMENT_WARNING,
             'value'       => $t('Cache path'),
           );
         }
-      elseif ($htaccess && count(explode("%{REQUEST_URI}$char%{QUERY_STRING}\.html", $htaccess)) < 3) {
-        $requirements['boost'] = array(
+      if ($htaccess && count(explode("%{REQUEST_URI}$char%{QUERY_STRING}\.html", $htaccess)) < 3) {
+        $requirements['boost_htaccess'] = array(
           'title'       => $t('Boost'),
           'description' => $t('.htaccess file does not contain the boost specific rewrite rules, or the rewrite rules have changed and they need to be updated. Get rules: <a href="@url">Boost Apache .htaccess settings generation</a>.', array('@url' => url('admin/settings/performance/boost#edit-boost-verbose'))),
           'severity'    => REQUIREMENT_ERROR,
           'value'       => $t('.htaccess file'),
         );
       }
-      elseif (!boost_chk_module_versions()) {
-        $requirements['boost'] = array(
+      if (!boost_chk_module_versions()) {
+        $requirements['boost_other_modules'] = array(
           'title'       => $t('Boost'),
           'description' => $t('You need to get a newer version of <a href="@url">poormanscron</a>, most likely the latest dev.', array('@url' => "http://drupal.org/project/poormanscron")),
           'severity'    => REQUIREMENT_ERROR,
           'value'       => $t('poormanscron is the wrong version'),
         );
       }
-      else {
+      if (variable_get('language_negotiation', LANGUAGE_NEGOTIATION_NONE) == LANGUAGE_NEGOTIATION_PATH) {
+        $requirements['boost_language'] = array(
+          'title'       => $t('Boost'),
+          'description' => $t('Boost is not compatible with '.
+            '<a href="!url">language negotiation</a> set to "language '.
+            'fallback".  An anonymous user with their browser set to a '.
+            "language other than the site's default language will navigate ".
+            "to a non-cached page.  The page will be displayed in the user's ".
+            'browser language.  Boost will cache the non-default-language '.
+            'page. ', array('!url' => url('admin/settings/language/configure'))),
+          'severity'    => REQUIREMENT_ERROR,
+          'value'       => $t('Cannot use "language fallback" language negotiation'),
+        );
+      }
+      if (empty($requirements)) {
         $requirements['boost'] = array(
           'title'       => $t('Boost'),
           'severity'    => REQUIREMENT_OK,
-          'value'       => t(''),
+          'value'       => t('Configured correctly, should be working.'),
         );
       }
     break;
