You are here

function _patterns_check_file_dir in Patterns 6.2

Same name and namespace in other branches
  1. 5 patterns.module \_patterns_check_file_dir()
  2. 6 patterns.module \_patterns_check_file_dir()

Check if a .htaccess file exists to prevent downloads of pattern files

File

./patterns.module, line 2253
Enables extremely simple adding/removing features to your site with minimal to no configuration

Code

function _patterns_check_file_dir() {
  return false;
  $path = file_create_path(variable_get('patterns_save_xml', 'patterns'));
  if (!is_file($path . '/.htaccess')) {
    $content = '# Prevent downloading site patterns
<FilesMatch "\\.xml$">
  Order allow,deny
</FilesMatch>
';
    file_save_data($content, $path . '/.htaccess');
  }
}