You are here

function feeds_xls_download_template in Feeds XLS 7

Callback function to provide the template.

1 string reference to 'feeds_xls_download_template'
feeds_xls_menu in ./feeds_xls.module
Implementation of hook_menu().

File

./feeds_xls.template.inc, line 518

Code

function feeds_xls_download_template($feeds_importer) {

  // Increase the memory limit
  ini_set('memory_limit', '1500M');
  ini_set('max_execution_time', 240);
  if (get_class($feeds_importer->parser) == 'FeedsExcelParser') {
    if (empty($feeds_importer->parser->config['no_headers'])) {
      feeds_xls_download_template_helper($feeds_importer);
      exit;
    }
    else {
      drupal_set_message(t('The current configuration for this importer is set to use no headers.'), 'error');
      drupal_goto(arg(0) . '/' . arg(1));
    }
  }
  else {

    // This isn't an Excel importer. Give an error message.
    drupal_set_message(t('The requested Feeds importer does not appear to be using the Excel parser.'), 'error');
    drupal_goto(arg(0) . '/' . arg(1));
  }
}