summaryrefslogtreecommitdiff
path: root/modules/system/system.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system/system.module')
-rw-r--r--modules/system/system.module8
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/system/system.module b/modules/system/system.module
index 414e7306d..a2c6e5a11 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -323,7 +323,7 @@ function system_view_general() {
'#default_value' => file_directory_path(),
'#maxlength' => 255,
'#description' => 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.'),
- '#post_process' => 'system_check_directory',
+ '#after_build' => 'system_check_directory',
);
$form['files']['file_directory_temp'] = array(
@@ -332,7 +332,7 @@ function system_view_general() {
'#default_value' => file_directory_temp(),
'#maxlength' => 255,
'#description' => t('Location where uploaded files will be kept during previews. Relative paths will be resolved relative to the Drupal installation directory.'),
- '#post_process' => 'system_check_directory',
+ '#after_build' => 'system_check_directory',
);
$form['files']['file_downloads'] = array(
@@ -466,12 +466,10 @@ function system_view_general() {
* fails, the form element is flagged with an error from within the
* file_check_directory function.
*
- * @param $form_id
- * The id of the form.
* @param $form_element
* The form element containing the name of the directory to check.
*/
-function system_check_directory($form_id, $form_element) {
+function system_check_directory($form_element) {
file_check_directory($form_element['#value'], FILE_CREATE_DIRECTORY, $form_element['#parents'][0]);
return $form_element;
}