You are here

function system_file_system_settings in Drupal 6

Same name and namespace in other branches
  1. 5 modules/system/system.module \system_file_system_settings()
  2. 7 modules/system/system.admin.inc \system_file_system_settings()

Form builder; Configure the site file handling.

See also

system_settings_form()

Related topics

1 string reference to 'system_file_system_settings'
system_menu in modules/system/system.module
Implementation of hook_menu().

File

modules/system/system.admin.inc, line 1399
Admin page callbacks for the system module.

Code

function system_file_system_settings() {
  $form['file_directory_path'] = array(
    '#type' => 'textfield',
    '#title' => t('File system path'),
    '#default_value' => file_directory_path(),
    '#maxlength' => 255,
    '#description' => t('A file system path where the files will be stored. This directory must exist and be writable by Drupal. If the download method is set to public, this directory must be relative to the Drupal installation directory and be accessible over the web. If the download method is set to private, this directory should not be accessible over the web. Changing this location will modify all download paths and may cause unexpected problems on an existing site.'),
    '#after_build' => array(
      'system_check_directory',
    ),
  );
  $form['file_directory_temp'] = array(
    '#type' => 'textfield',
    '#title' => t('Temporary directory'),
    '#default_value' => file_directory_temp(),
    '#maxlength' => 255,
    '#description' => t('A file system path where uploaded files will be stored during previews.'),
    '#after_build' => array(
      'system_check_directory',
    ),
  );
  $form['file_downloads'] = array(
    '#type' => 'radios',
    '#title' => t('Download method'),
    '#default_value' => variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC),
    '#options' => array(
      FILE_DOWNLOADS_PUBLIC => t('Public - files are available using HTTP directly.'),
      FILE_DOWNLOADS_PRIVATE => t('Private - files are transferred by Drupal.'),
    ),
    '#description' => t('Choose the <em>Public download</em> method unless you wish to enforce fine-grained access controls over file downloads. Changing the download method will modify all download paths and may cause unexpected problems on an existing site.'),
  );
  return system_settings_form($form);
}