You are here

function ViewsDataExportExporterXML::get_headers in Views data export 7.4

Provide headers to the page when an export file is being downloaded.

Parameters

$filename: The name of the file being downloaded. e.g. export.xls.

Overrides ViewsDataExportExporter::get_headers

File

exporters/views_data_export_exporter_xml.inc, line 331

Class

ViewsDataExportExporterXML
Webform exporter for creating XML files.

Code

function get_headers($filename) {
  $headers = array();
  $headers['Content-Type'] = 'application/force-download';
  $headers['Pragma'] = 'public';
  $headers['Cache-Control'] = 'max-age=0';
  return $headers;
}