Project

General

Profile

« Previous | Next » 

Revision 8de8732c

Added by Lorna Morris about 12 years ago

tidied up Views

View differences:

7.x/modules/dwca_export/dwca_export.module
101 101
		
102 102
		if ($dwca_filename == 'description') {
103 103
			
104
			
105
		$views[$dwca_filename] = array (
106
					'#type' => 'fieldset',
107
  					'#title' => t('DESCRIPTIVE DATA TYPES'),
108
				  	'#weight' => 3,
109
				  	'#collapsible' => TRUE,
110
				  	'#collapsed' => TRUE,
111
				  	'#tree' => FALSE,
112
			
113
  		);
104 114
			foreach($view_data as $dwca_filename_inner => $view_data_inner){
115
				
116
				
105 117
				$views[$dwca_filename][$dwca_filename_inner] = array(
106 118
									  	'#type' => 'textfield',
107 119
									  	'#title' => t($dwca_filename . '_' . $dwca_filename_inner),
108 120
									  	'#default_value' => $view_data_inner['view_name'],
109 121
									  	'#size' => 60,
110
									  	'#maxlength' => 64,
111 122
									  	'#description' => t('specify view for ' . $dwca_filename_inner),
112 123
			
113 124
				);
......
119 130
					  	'#title' => t($dwca_filename),
120 131
					  	'#default_value' => $view_data['view_name'],
121 132
					  	'#size' => 60,
122
					  	'#maxlength' => 64,
123 133
					  	'#description' => t('specify view for ' . $dwca_filename),
124 134
			
125 135
			);
......
378 388
			$lineOfText = fgets($descTypeFile, 4096);
379 389

  
380 390
			$items = explode(',', $lineOfText);
381

  
391
		
392
			drupal_set_message(t('items[0]... ') . $items[0] . "!");
393
			drupal_set_message(t('items[1]... ') . $items[1] . "!");
394
			drupal_set_message(t('items[2]... ') . $items[2] . "!");
382 395
			//don't include empty descriptions or lines at the end of the view which start with the field name id
383 396
			//if ($items[2]=="\"\""  || (!$items[0]=="\"id\"")) { //doesn't work - produces empty files
384
			if (!empty($items[2])  || (!$items[0]=="id")) {
397
			//if ($items[2]!="\"\""  || trim($items[2]!="\"\"")) {
398
			if (!$items[0]=="id") {
385 399

  
386 400
				// fix conflict with files that have an EOL that differs from the server EOL
387 401
				$lineOfText = rtrim($lineOfText, "\r\n") . PHP_EOL;

Also available in: Unified diff