diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2003-12-29 18:08:33 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2003-12-29 18:08:33 +0000 |
commit | 286f6188780e17f65279e6ed063e7f51aff6d7e5 (patch) | |
tree | b8ec5d65552ba5cd2164d80c31cbbea171b4e2a5 | |
parent | 059e5cca08c7d57ee090d21537bde2eae2e56332 (diff) | |
download | brdo-286f6188780e17f65279e6ed063e7f51aff6d7e5.tar.gz brdo-286f6188780e17f65279e6ed063e7f51aff6d7e5.tar.bz2 |
- Fixing temp directory check.
-rw-r--r-- | modules/system.module | 2 | ||||
-rw-r--r-- | modules/system/system.module | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/system.module b/modules/system.module index 7baf4ecab..e7f93db64 100644 --- a/modules/system.module +++ b/modules/system.module @@ -130,7 +130,7 @@ function system_view_general() { if (!file_check_directory(variable_get('file_directory_path', 'files'))) { $error['file_directory_path'] = theme('error', t('Directory does not exist, or is not writable.')); } - if (!file_check_directory(variable_get('file_directory_temp', ini_get('upload_tmp_dir')))) { + if (!file_check_directory(variable_get('file_directory_temp', (PHP_OS == 'WINNT' ? 'c:\\windows\\temp' : '/tmp')))) { $error['file_directory_temp'] = theme('error', t('Directory does not exist, or is not writable.')); } $group = form_textfield(t('File system path'), 'file_directory_path', variable_get('file_directory_path', 'files'), 70, 255, t('A file system path where the files will be stored. This directory has to exist and be writable by Drupal. If the download method is set to public this directory has to be relative to Drupal installation directory, and be accessible over the web. When download method is set to private this directory should not be accessible over the web. Changing this location after the site has been in use will cause problems so only change this setting on an existing site if you know what you are doing.') . $error['file_directory_path']); diff --git a/modules/system/system.module b/modules/system/system.module index 7baf4ecab..e7f93db64 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -130,7 +130,7 @@ function system_view_general() { if (!file_check_directory(variable_get('file_directory_path', 'files'))) { $error['file_directory_path'] = theme('error', t('Directory does not exist, or is not writable.')); } - if (!file_check_directory(variable_get('file_directory_temp', ini_get('upload_tmp_dir')))) { + if (!file_check_directory(variable_get('file_directory_temp', (PHP_OS == 'WINNT' ? 'c:\\windows\\temp' : '/tmp')))) { $error['file_directory_temp'] = theme('error', t('Directory does not exist, or is not writable.')); } $group = form_textfield(t('File system path'), 'file_directory_path', variable_get('file_directory_path', 'files'), 70, 255, t('A file system path where the files will be stored. This directory has to exist and be writable by Drupal. If the download method is set to public this directory has to be relative to Drupal installation directory, and be accessible over the web. When download method is set to private this directory should not be accessible over the web. Changing this location after the site has been in use will cause problems so only change this setting on an existing site if you know what you are doing.') . $error['file_directory_path']); |