Revision 04291712
Added by Andreas Kohlbecker over 12 years ago
7.x/modules/dwca_export/dwca_export.module | ||
---|---|---|
48 | 48 |
|
49 | 49 |
$tmp_archive_file_name = dwca_export_create_archive( _get_views_map() ); |
50 | 50 |
|
51 |
// 1. http://api.drupal.org/api/drupal/includes--file.inc/function/file_copy/7 |
|
52 |
// 2. file_transfer($tmp_archive_file_name, $headers) |
|
53 |
|
|
54 |
print "TODO export"; |
|
51 |
if($tmp_archive_file_name){ |
|
52 |
file_transfer($tmp_archive_file_name, array('Content-Type' => 'application/zip')); |
|
53 |
} else { |
|
54 |
print "ERROR"; |
|
55 |
} |
|
55 | 56 |
} |
56 | 57 |
|
57 | 58 |
/** |
... | ... | |
61 | 62 |
* |
62 | 63 |
* @param - $views_map maps a view paths to dwca filenames |
63 | 64 |
* |
64 |
* @return the path in the filesystem to the final archive |
|
65 |
* @return the path in the filesystem to the final archive, |
|
66 |
* or FALSE in case of an error. |
|
65 | 67 |
*/ |
66 | 68 |
function dwca_export_create_archive($views_map) { |
67 | 69 |
|
68 |
$tmp_archive_file_name = drupal_tempnam(file_directory_temp(), "dwca_export_");
|
|
70 |
$tmp_archive_file_name = drupal_tempnam("temporary://", "dwca_export_");
|
|
69 | 71 |
|
70 | 72 |
return $tmp_archive_file_name; |
71 | 73 |
} |
Also available in: Unified diff
sending archive to client