You are here

function dynamic_background_settings_form_validate in Dynamic Background 7.2

Validation function for the administration settings form.

1 string reference to 'dynamic_background_settings_form_validate'
dynamic_background_settings_form in ./dynamic_background.module
The dynamic background administration settings form.

File

./dynamic_background.module, line 368
This module enables administrators to upload images used as background on the site. The selected background image link is exposed as either $background in the page.tpl file or as /background.css.

Code

function dynamic_background_settings_form_validate($form, &$form_state) {

  // Create upload path.
  $path = file_default_scheme() . '://' . check_plain($form_state['values']['dynamic_background_setting']['path']);
  if (!file_prepare_directory($path, FILE_CREATE_DIRECTORY)) {
    form_set_error('path', t('The entered path could not be created.'));
  }
}