You are here

function patterns_download_file in Patterns 7

Same name and namespace in other branches
  1. 7.2 includes/io/download.inc \patterns_download_file()
1 call to patterns_download_file()
patterns_export_to_file in patterns_export/finalize.inc
Exports a pattern as a donwlodable text file

File

includes/io/download.inc, line 73
Importing Patterns from a file or using an URL.

Code

function patterns_download_file($file, $filename) {
  drupal_add_http_header("Content-type", " text/plain; charset=utf-8");
  drupal_add_http_header("Content-Disposition", "attachment;filename=" . $filename);
  print $file;
  exit;
}