You are here

function demo_admin_settings_submit in Demonstration site (Sandbox / Snapshot) 5

File

./demo.admin.inc, line 67
Demonstration Site administrative pages

Code

function demo_admin_settings_submit($form_id, $values) {
  if (!file_check_directory($values['path'], FILE_CREATE_DIRECTORY)) {
    form_set_error('path', t('The snapshot directory %directory could not be created.', array(
      '%directory' => $values['path'],
    )));
    return FALSE;
  }
  else {
    variable_set('demo_dump_path', $values['path']);
  }
  variable_set('demo_reset_interval', $values['interval']);
  drupal_set_message(t('The configuration options have been saved.'));
}