Commit 41db52d2 authored by Chris Wu's avatar Chris Wu Committed by Liam Morland
Browse files

Issue #2101643 by Liam Morland, amourow, seanB, hey_germano, chrisroane,...

Issue #2101643 by Liam Morland, amourow, seanB, hey_germano, chrisroane, jenlampton: Allow progressive batch export to be disabled
parent 51046b83
Loading
Loading
Loading
Loading
+7 −0
Changes for includes/webform.admin.inc: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -192,6 +192,13 @@ function webform_admin_settings() {
    '#description' => t('Choose the format for the display of date components. Only the date portion of the format is used. Reporting and export use the short format.'),
  );

  $form['advanced']['webform_export_use_progressive_batch'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable progressive batch export'),
    '#default_value' => webform_variable_get('webform_export_use_progressive_batch'),
    '#description' => t('This is checked by default. Uncheck if you are experiencing failed export downloads in a load-balanced environment.'),
  );

  $form['advanced']['webform_export_format'] = array(
    '#type' => 'radios',
    '#title' => t('Default export format'),
+7 −0
Changes for includes/webform.report.inc: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -880,6 +880,13 @@ function webform_results_download_form_submit(&$form, &$form_state) {
  // Set up a batch to export the results.
  $batch = webform_results_export_batch($node, $format, $options);
  batch_set($batch);

  // Disable progressive batch process.
  if (!webform_variable_get('webform_export_use_progressive_batch')) {
    $batch =& batch_get();
    $batch['progressive'] = FALSE;
    batch_process();
  }
}

/**
+1 −0
Changes for webform.install: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -813,6 +813,7 @@ function webform_uninstall() {
  variable_del('webform_token_access');
  variable_del('webform_update_batch_size');
  variable_del('webform_disabled_components');
  variable_del('webform_export_use_progressive_batch');

  foreach (node_type_get_names() as $type => $name) {
    variable_del('webform_node_' . $type);
+4 −0
Changes for webform.module: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -4413,6 +4413,10 @@ function webform_variable_get($variable) {
      $result = variable_get('webform_date_type', 'medium');
      break;

    case 'webform_export_use_progressive_batch':
      $result = variable_get('webform_export_use_progressive_batch', TRUE);
      break;

    case 'webform_export_format':
      module_load_include('inc', 'webform', 'includes/webform.export');
      $options = webform_export_list();