You are here

function date_copy_import_ical_form_validate in Date 5

iCal import processing.

File

./date_copy.module, line 315

Code

function date_copy_import_ical_form_validate($form_id, $form_values) {
  extract($form_values);
  if ($step == 2) {
    return;
  }
  include_once drupal_get_path('module', 'date_api') . '/date.inc';
  include_once drupal_get_path('module', 'date_api') . '/date_api_ical.inc';
  $imported_values = date_ical_import($source_file);
  if (empty($imported_values)) {
    form_set_error('source_file', t('This is an invalid file.'));
  }
}