function breakpoints_admin_breakpoint_import_form_validate

cis7 breakpoints.admin.inc breakpoints_admin_breakpoint_import_form_validate($form, &$form_state)

Validate a breakpoint import.

File

sites/all/modules/local_contrib/breakpoints/breakpoints.admin.inc, line 996
Breakpoints - admin settings

Code

function breakpoints_admin_breakpoint_import_form_validate($form, &$form_state) {
  ctools_include('export');
  $code = $form_state['values']['import'];
  $breakpoint = ctools_export_crud_import('breakpoints', $code);
  if (!breakpoints_breakpoint_validate($breakpoint)) {
    form_set_error('import', t('Not a valid breakpoint object'));
  }
  else {
    if (breakpoints_breakpoint_machine_name_exists($breakpoint->machine_name)) {
      form_set_error('import', t('A breakpoint with machine name %name already exists', array('%name' => $breakpoint->machine_name)));
    }
    else {
      form_set_value($form['import'], $breakpoint, $form_state);
    }
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.