diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-27 17:25:28 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-27 17:25:28 +0000 |
commit | 9b2bf38e836632e0395cd2673fc397dfcccc4630 (patch) | |
tree | 5b8663b007981de0df34ac7aafe240ff144345be /modules | |
parent | 79d927f7aa76dc0b0eaf103d5e7bfb9072247b47 (diff) | |
download | brdo-9b2bf38e836632e0395cd2673fc397dfcccc4630.tar.gz brdo-9b2bf38e836632e0395cd2673fc397dfcccc4630.tar.bz2 |
#194369 by lots of contributors: move default files directory to sites/default/files which can be created automatically on install, so no need to bug the user about it, making the install process easier
Diffstat (limited to 'modules')
-rw-r--r-- | modules/system/system.install | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/system/system.install b/modules/system/system.install index c23bfddee..980524561 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -151,6 +151,12 @@ function system_requirements($phase) { // Test files directory $directory = file_directory_path(); + + // For installer, create the directory if possible. + if ($phase == 'install' && !is_dir($directory) && @mkdir($directory)) { + @chmod($directory, 0775); // Necessary for non-webserver users. + } + $is_writable = is_writable($directory); $is_directory = is_dir($directory); if (!$is_writable || !$is_directory) { @@ -170,7 +176,7 @@ function system_requirements($phase) { else if ($phase == 'install') { // For the installer UI, we need different wording. 'value' will // be treated as version, so provide none there. - $requirements['file system']['description'] = $error .' '. $t('To proceed with the installation, please ensure that the files directory exists and is writable by the installer. If you are unsure how to create this directory and modify its permissions, please consult the <a href="@handbook_url">on-line handbook</a> or INSTALL.txt.', array('%directory' => $directory, '@handbook_url' => 'http://drupal.org/server-permissions')); + $requirements['file system']['description'] = $error .' '. $t('An automated attempt to create this directory failed, possibly due to a permissions problem. To proceed with the installation, either create the directory and modify its permissions manually, or ensure that the installer has the permissions to create it automatically. For more information, please see INSTALL.txt or the <a href="@handbook_url">on-line handbook</a>.', array('@handbook_url' => 'http://drupal.org/server-permissions')); $requirements['file system']['value'] = ''; } } |