Project

General

Profile

« Previous | Next » 

Revision b9d89ce7

Added by Lorna Morris about 10 years ago

See #2869. Zip file now contains all DwcA files directly. Set "ignoreHeaderLines" = 0 in meta.xml. Removed Page display is description views.

View differences:

7.x/modules/dwca_export/dwca_export.module
3 3
// at the moment we are using a static meta.xml file
4 4
define ("METADATA_FILE_NAME", "meta.xml");
5 5
define ("STATIC_DIR", "/static/");
6
define ("ARCHIVE_ROOT_DIR", "dwca_export/");
6
//define ("ARCHIVE_ROOT_DIR", "dwca_export/");
7 7
define ('FILE_MAP', 'dwca_export_archive_descriptor_file_map');
8 8
define ('FILE_EXTENSION', ".txt");
9 9

  
......
178 178
				$description_map = $dwca_export_archive_descriptor_file_map[$description_key];
179 179

  
180 180
				if (array_key_exists($key, $description_map)) {
181
					//drupal_set_message(t('The ooKEY is... ') . $key . t('The ooVALUE is... ') . $value);
181
					drupal_set_message(t('The ooKEY is... ') . $key . t('The ooVALUE is... ') . $value);
182 182
					$dwca_export_archive_descriptor_file_map[$description_key][$key]['view_name'] = $value;
183 183
				}
184 184
			}
......
307 307
	
308 308
	
309 309
	// add metadata
310
	$zip->addFile($module_static_dir_absolute_path.METADATA_FILE_NAME, ARCHIVE_ROOT_DIR.METADATA_FILE_NAME);
310
	$zip->addFile($module_static_dir_absolute_path.METADATA_FILE_NAME, METADATA_FILE_NAME);
311 311

  
312 312
	global $base_url;
313 313

  
......
425 425
function _dwca_export_add_files_to_zip($view_temp_file = NULL, $dwca_filename, $zip){
426 426
	
427 427
	if($view_temp_file){
428
		$zip->addFile(drupal_realpath($view_temp_file), ARCHIVE_ROOT_DIR.$dwca_filename . FILE_EXTENSION);
428
		$zip->addFile(drupal_realpath($view_temp_file), $dwca_filename . FILE_EXTENSION);
429 429
	}else{
430 430
		throw new Exception(t('Cannot create %file', array('%file' => $dwca_filename)));
431 431
	}

Also available in: Unified diff