You are here

function configuration_ui_validate_settings in Configuration Management 7.2

1 string reference to 'configuration_ui_validate_settings'
configuration_ui_settings_form in ui/configuration_ui.admin.inc
Menu Callback Form.

File

ui/configuration_ui.admin.inc, line 659
User interface functions for Configuration Management.

Code

function configuration_ui_validate_settings($form, &$form_state) {
  $form_element = $form['general_settings']['configuration_config_path'];
  if (empty($form_state['values']['configuration_remote_server'])) {
    system_check_directory($form_element);
  }
  else {
    $directory = $form_state['values']['configuration_config_path'];
    if (!is_dir($directory)) {

      // If the directory does not exists and cannot be created.
      form_set_error($form_element['#parents'][0], t('The directory %directory does not exist.', array(
        '%directory' => $directory,
      )));
      watchdog('file system', 'The directory %directory does not exist.', array(
        '%directory' => $directory,
      ), WATCHDOG_ERROR);
    }
  }
}