5.x system.module system_file_system_settings()
6.x system.admin.inc system_file_system_settings()
7.x system.admin.inc system_file_system_settings()
1 string reference to 'system_file_system_settings'
system_menu in modules/system/system.module
Implementation of hook_menu().

File

modules/system/system.module, line 712
Configuration system that lets administrators modify the workings of the site.

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 has to exist and be writable by Drupal. If the download method is set to public this directory has to be relative to the 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.'),
    '#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('Location where uploaded files will be kept during previews. Relative paths will be resolved relative to the Drupal installation directory.'),
    '#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('If you want any sort of access control on the downloading of files, this needs to be set to <em>private</em>. You can change this at any time, however all download URLs will change and there may be unexpected problems so it is not recommended.'),
  );
  return system_settings_form($form);
}