You are here

function taxonomy_xml_import_form_submit in Taxonomy import/export via XML 7

Same name and namespace in other branches
  1. 6.2 taxonomy_xml.module \taxonomy_xml_import_form_submit()
  2. 6 taxonomy_xml.module \taxonomy_xml_import_form_submit()

Imports the actual XML.

1 string reference to 'taxonomy_xml_import_form_submit'
upload_taxonomy_service_form in services/upload.taxonomy_service.inc
A sub-form that provides UI additions to the taxonomy import form

File

./taxonomy_xml.admin.inc, line 162
UI and forms for administering taxonomy_xml

Code

function taxonomy_xml_import_form_submit($form, &$form_state) {
  module_load_include('inc', 'taxonomy_xml', 'taxonomy_xml.process');

  // Remember current prefs, just for convenience.
  // Speaking of convenience,
  // why does my form discard these values all the time?
  $service_id = $form_state['values']['service_id'];
  variable_set('taxonomy_xml_service_id', $service_id);
  variable_set('taxonomy_xml_format', @$form_state['values'][$service_id]['format']);
  variable_set('taxonomy_xml_identifier', @$form_state['values'][$service_id]['identifier']);
  variable_set('taxonomy_xml_url', @$form_state['values'][$service_id]['url']);
  variable_set('taxonomy_xml_vid', $form_state['values']['vid']);
  variable_set('taxonomy_xml_duplicate', $form_state['values']['duplicate']);
  variable_set('taxonomy_xml_recurse_down', $form_state['values']['recurse_down']);
  variable_set('taxonomy_xml_watchdog_level', $form_state['values']['taxonomy_xml_watchdog_level']);

  // Each of the respective services will take care of this form submission
  // in their own way.
  // The initial import may have queued up some further process to do.
  // Check the queue and run it when this form goes.
  batch_set(taxonomy_xml_add_term_to_batch_queue());
}