Commit 57bdf1b1 authored by Dries's avatar Dries

- Patch #613936 by joachim: File_create_htaccess() has an inconsistent name.

parent e67898ff
......@@ -462,11 +462,11 @@ function file_prepare_directory(&$directory, $options = FILE_MODIFY_PERMISSIONS)
* If missing, create a .htaccess file in each Drupal files directory.
*/
function file_ensure_htaccess() {
file_create_htaccess('public://', FALSE);
file_save_htaccess('public://', FALSE);
if (variable_get('file_private_path', FALSE)) {
file_create_htaccess('private://', TRUE);
file_save_htaccess('private://', TRUE);
}
file_create_htaccess('temporary://', TRUE);
file_save_htaccess('temporary://', TRUE);
}
/**
......@@ -478,7 +478,7 @@ function file_ensure_htaccess() {
* FALSE indicates that $directory should be an open and public directory.
* The default is TRUE which indicates a private and protected directory.
*/
function file_create_htaccess($directory, $private = TRUE) {
function file_save_htaccess($directory, $private = TRUE) {
if (file_uri_scheme($directory)) {
$directory = file_stream_wrapper_uri_normalize($directory);
}
......
......@@ -2164,11 +2164,11 @@ function system_check_directory($form_element) {
elseif (is_dir($directory)) {
if ($form_element['#name'] == 'file_public_path') {
// Create public .htaccess file.
file_create_htaccess($directory, FALSE);
file_save_htaccess($directory, FALSE);
}
else {
// Create private .htaccess file.
file_create_htaccess($directory);
file_save_htaccess($directory);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment