commit b9d89ce735f40f7d64b17526f5d84a3b6ff3e33d
Author: l.morris <l.morris@localhost>
Date:   Mon Apr 16 13:48:56 2012 +0000

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

diff --git a/7.x/modules/dwca_export/dwca_export.module b/7.x/modules/dwca_export/dwca_export.module
index 8ebff91d..c9f1be8d 100644
--- a/7.x/modules/dwca_export/dwca_export.module
+++ b/7.x/modules/dwca_export/dwca_export.module
@@ -3,7 +3,7 @@
 // at the moment we are using a static meta.xml file
 define ("METADATA_FILE_NAME", "meta.xml");
 define ("STATIC_DIR", "/static/");
-define ("ARCHIVE_ROOT_DIR", "dwca_export/");
+//define ("ARCHIVE_ROOT_DIR", "dwca_export/");
 define ('FILE_MAP', 'dwca_export_archive_descriptor_file_map');
 define ('FILE_EXTENSION', ".txt");
 
@@ -178,7 +178,7 @@ function dwca_export_config_form_submit($form, &$form_state) {
 				$description_map = $dwca_export_archive_descriptor_file_map[$description_key];
 
 				if (array_key_exists($key, $description_map)) {
-					//drupal_set_message(t('The ooKEY is... ') . $key . t('The ooVALUE is... ') . $value);
+					drupal_set_message(t('The ooKEY is... ') . $key . t('The ooVALUE is... ') . $value);
 					$dwca_export_archive_descriptor_file_map[$description_key][$key]['view_name'] = $value;
 				}
 			}
@@ -307,7 +307,7 @@ function dwca_export_create_archive($views_map) {
 	
 	
 	// add metadata
-	$zip->addFile($module_static_dir_absolute_path.METADATA_FILE_NAME, ARCHIVE_ROOT_DIR.METADATA_FILE_NAME);
+	$zip->addFile($module_static_dir_absolute_path.METADATA_FILE_NAME, METADATA_FILE_NAME);
 
 	global $base_url;
 
@@ -425,7 +425,7 @@ function _dwca_export_concatenate_description_files($view_data, $zip){
 function _dwca_export_add_files_to_zip($view_temp_file = NULL, $dwca_filename, $zip){
 	
 	if($view_temp_file){
-		$zip->addFile(drupal_realpath($view_temp_file), ARCHIVE_ROOT_DIR.$dwca_filename . FILE_EXTENSION);
+		$zip->addFile(drupal_realpath($view_temp_file), $dwca_filename . FILE_EXTENSION);
 	}else{
 		throw new Exception(t('Cannot create %file', array('%file' => $dwca_filename)));
 	}
diff --git a/7.x/modules/dwca_export/dwca_export.views_default.inc b/7.x/modules/dwca_export/dwca_export.views_default.inc
index 7254e391..cd889057 100644
--- a/7.x/modules/dwca_export/dwca_export.views_default.inc
+++ b/7.x/modules/dwca_export/dwca_export.views_default.inc
@@ -73,11 +73,11 @@ function _view_classification() {
 	$handler->display->display_options['relationships']['parent']['ui_name'] = 'relParent';
 	$handler->display->display_options['relationships']['parent']['required'] = 0;
 	/* Relationship: Taxonomy term: Taxonomy term using Associated accepted name */
-	$handler->display->display_options['relationships']['field_aan_4_taxonomy_term']['id'] = 'field_aan_4_taxonomy_term';
-	$handler->display->display_options['relationships']['field_aan_4_taxonomy_term']['table'] = 'taxonomy_term_data';
-	$handler->display->display_options['relationships']['field_aan_4_taxonomy_term']['field'] = 'field_aan_4_taxonomy_term';
-	$handler->display->display_options['relationships']['field_aan_4_taxonomy_term']['label'] = 'assoc_accept_term';
-	$handler->display->display_options['relationships']['field_aan_4_taxonomy_term']['required'] = 0;
+	$handler->display->display_options['relationships']['reverse_field_aan_4_taxonomy_term']['id'] = 'reverse_field_aan_4_taxonomy_term';
+	$handler->display->display_options['relationships']['reverse_field_aan_4_taxonomy_term']['table'] = 'taxonomy_term_data';
+	$handler->display->display_options['relationships']['reverse_field_aan_4_taxonomy_term']['field'] = 'reverse_field_aan_4_taxonomy_term';
+	$handler->display->display_options['relationships']['reverse_field_aan_4_taxonomy_term']['label'] = 'assoc_accept_term';
+	$handler->display->display_options['relationships']['reverse_field_aan_4_taxonomy_term']['required'] = 0;
 	/* Field: Taxonomy term: Term ID */
 	$handler->display->display_options['fields']['tid_2']['id'] = 'tid_2';
 	$handler->display->display_options['fields']['tid_2']['table'] = 'taxonomy_term_data';
@@ -1801,8 +1801,8 @@ function _view_description($desc_type) {
 	);
 
 	/* Display: Page */
-	$handler = $view->new_display('page', 'Page', 'page');
-	$handler->display->display_options['path'] = t('dwca-export/description-' . $desc_type . '/page');
+	/*$handler = $view->new_display('page', 'Page', 'page');
+	$handler->display->display_options['path'] = t('dwca-export/description-' . $desc_type . '/page');*/
 
 	/* Display: Data export */
 	$handler = $view->new_display('views_data_export', 'Data export', 'views_data_export_1');
diff --git a/7.x/modules/dwca_export/static/meta.xml b/7.x/modules/dwca_export/static/meta.xml
index ed98a087..1f6c270a 100644
--- a/7.x/modules/dwca_export/static/meta.xml
+++ b/7.x/modules/dwca_export/static/meta.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <archive xmlns="http://rs.tdwg.org/dwc/text/">
-	<core encoding="UTF-8" linesTerminatedBy="\r\n" fieldsTerminatedBy="," fieldsEnclosedBy="&quot;" ignoreHeaderLines="1" rowType="http://rs.tdwg.org/dwc/terms/Taxon">
+	<core encoding="UTF-8" linesTerminatedBy="\r\n" fieldsTerminatedBy="," fieldsEnclosedBy="&quot;" ignoreHeaderLines="0" rowType="http://rs.tdwg.org/dwc/terms/Taxon">
 		<files>
 			<location>classification.txt</location>
 		</files>
