You are here

function demo_dump_form_validate in Demonstration site (Sandbox / Snapshot) 7

Form validation handler for demo_dump_form().

File

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

Code

function demo_dump_form_validate(&$form, &$form_state) {
  if (empty($form_state['values']['confirm'])) {
    $fileconfig = demo_get_fileconfig($form_state['values']['dump']['filename']);
    if (file_exists($fileconfig['infofile']) || file_exists($fileconfig['sqlfile'])) {
      $form_state['demo']['dump_exists'] = TRUE;
      $form_state['rebuild'] = TRUE;
    }
  }
}