You are here

function dba_settings_validate in Database Administration 5

File

./dba.module, line 318
Allows administrators direct access to their Drupal database. Written by Jeremy Andrews <jeremy@kerneltrap.org>, June 2004. PostgreSQL functionality provided by AAM <aam@ugpl.de> Major security audit, porting, and maintenance by Derek…

Code

function dba_settings_validate($form_id, $form_values, $form) {
  if (!file_check_directory($form_values['dba_auto_backup_path'])) {
    form_set_error('dba_auto_backup_path', t('The automatic backup path does not exist, or is not writeable. Automatic backups will not begin until you fix this error.'));
  }
  elseif ($test = tempnam($form_values['dba_auto_backup_path'], 'dba.')) {
    file_delete($test);
  }
  else {
    form_set_error('dba_auto_backup_path', t('The automatic backup path exists, but is not writeable. Automatic backups will not begin until you fix this error.'));
  }
}