You are here

function boost_chk_htaccess_doc_subdir in Boost 6

Check htaccess file if needed subdir references are in it.

1 call to boost_chk_htaccess_doc_subdir()
boost_requirements in ./boost.install
Implementation of hook_requirements().

File

./boost.install, line 328
Handles Boost module installation and upgrade tasks.

Code

function boost_chk_htaccess_doc_subdir($htaccess) {
  global $base_path;
  $drupal_subdir = rtrim($base_path, '/');
  if (strlen($drupal_subdir) > 0) {
    $rules = (int) BOOST_CACHE_HTML + (int) BOOST_CACHE_XML + (int) BOOST_CACHE_JSON + (int) BOOST_CACHE_CSS + (int) BOOST_CACHE_JS;
    $rules = BOOST_GZIP ? $rules * 2 + 1 : $rules + 1;
    if (BOOST_CACHE_HTML || BOOST_CACHE_XML || BOOST_CACHE_JSON) {
      $rules++;
    }
    if (count(explode($drupal_subdir, $htaccess)) < $rules) {
      return FALSE;
    }
  }
  return TRUE;
}