Project

General

Profile

« Previous | Next » 

Revision 71920c02

Added by Lorna Morris over 10 years ago

minor bug fix

View differences:

7.x/modules/dwca_export/dwca_export.module
118 118
				  	'#weight' => 3,
119 119
				  	'#collapsible' => TRUE,
120 120
				  	'#collapsed' => TRUE,
121
				  	'#tree' => FALSE,
121
					//'#prefix' => '<table>',
122
		  			//'#suffix' => '</table>',	
123
				  	'#tree' => TRUE,
122 124
			
123 125
  		);
124 126
			foreach($view_data as $dwca_filename_inner => $view_data_inner){
......
130 132
									  	'#default_value' => $view_data_inner['view_name'],
131 133
									  	'#size' => 60,
132 134
									  	'#description' => t('specify view for ' . $dwca_filename_inner),
135
									//'#prefix' => '<tr>',
136
								    //'#suffix' => '</tr>',
133 137
			
134 138
				);
139
								
140
				//TODO: Change collaped discription form to table, layout using <td> and <tr> e.g. try 3 description types per row
141
				
135 142
			}
136 143
			
137 144
		} else {
......
391 398
			
392 399
			//don't include empty descriptions or lines at the end of the view which start with the field name id
393 400
			//some lines just contain a single " if there is a carriage return within the description text so remove these too
394
			if ($items[0]!=="\"id\""  && trim($items[2])!=="\"\"") {
401
			
402
			if (isset($items[0]) && isset($items[2])) {
395 403
				
396
				// fix conflict with files that have an EOL that differs from the server EOL
397
				$lineOfText = rtrim($lineOfText, "\r\n") . PHP_EOL;
398
				fwrite($desc_file, $lineOfText);
404
				if ($items[0]!=="\"id\""  && trim($items[2])!=="\"\"") {
399 405
				
406
					// fix conflict with files that have an EOL that differs from the server EOL
407
					$lineOfText = rtrim($lineOfText, "\r\n") . PHP_EOL;
408
					fwrite($desc_file, $lineOfText);
400 409
				
410
				}	
401 411
				
402 412
			} else {
403 413
				fgets($descTypeFile, 4096);

Also available in: Unified diff