Revision 3615aa8e
Added by Lorna Morris about 11 years ago
7.x/modules/dwca_export/dwca_export.module | ||
---|---|---|
229 | 229 |
if(!isset($file_map)){ |
230 | 230 |
$file_map = variable_get(FILE_MAP); |
231 | 231 |
} |
232 |
|
|
233 |
//lorna - there's no file_name for description |
|
234 |
drupal_set_message(t('The file_name... ') . $file_name); |
|
235 | 232 |
|
236 | 233 |
if($file_name && $out_file_url){ |
237 | 234 |
|
238 |
//lorna |
|
239 |
drupal_set_message(t('The file_name... ') . $file_name . t('The out_file_url... ') . $out_file_url); |
|
240 |
|
|
241 | 235 |
if (($file_name == 'general') || ($file_name == 'morphology')) { |
242 | 236 |
$file_map['description'][$file_name]['out_file_url'] = $out_file_url; |
243 | 237 |
//$file_map[$file_name]['morphology']['out_file_url'] = $out_file_url; |
244 | 238 |
} else { |
245 |
/// |
|
239 |
|
|
246 | 240 |
$file_map[$file_name]['out_file_url'] = $out_file_url; |
247 | 241 |
} |
248 | 242 |
} |
... | ... | |
302 | 296 |
$view = views_get_view($view_data_inner['view_name']); |
303 | 297 |
|
304 | 298 |
$options = array ( |
305 |
//'output_file' => $view_data['general']['view_name'] |
|
306 |
'output_file' => $filename_inner |
|
307 |
);//The filename is description, but we have mulitple description views - where do we merge them? |
|
308 |
|
|
309 |
//lorna |
|
310 |
drupal_set_message(t('CREATED A FILE NAME FOR DESCRIPTION: ') . $view_data['general']['view_name']); |
|
311 |
drupal_set_message(t('The display name is: ') . $view_data['general']['display_id']); |
|
312 |
drupal_set_message(t('The filename_inner is: ') . $filename_inner); |
|
299 |
'output_file' => $filename_inner |
|
300 |
); |
|
313 | 301 |
|
314 | 302 |
//_dwca_export_views_data_export_override_batch($view, $view_data['general']['display_id'], $options); |
315 | 303 |
_dwca_export_views_data_export_override_batch($view, $view_data_inner['display_id'], $options); |
316 | 304 |
|
317 |
//$view->execute_display($view_data['general']['display_id']); |
|
318 | 305 |
$view->execute_display($view_data_inner['display_id']); |
319 | 306 |
} |
320 | 307 |
|
... | ... | |
353 | 340 |
|
354 | 341 |
/** |
355 | 342 |
* |
356 |
* Combines multiple Description Views for different description types into a single file |
|
343 |
* Combines multiple Description Views for different description types into a single text file
|
|
357 | 344 |
* @param $view_data The inner array containing the view data for the different description types |
358 | 345 |
* @param $zip The zip file for the files making up the DwC-A. |
359 | 346 |
*/ |
... | ... | |
396 | 383 |
fgets($theFile); |
397 | 384 |
} |
398 | 385 |
|
399 |
drupal_set_message($lineOfText); |
|
400 | 386 |
} |
401 | 387 |
|
402 | 388 |
fclose($theFile); |
... | ... | |
430 | 416 |
*/ |
431 | 417 |
function _dwca_export_views_data_export_override_batch($view = NULL, $display = NULL, $options = TRUE) { |
432 | 418 |
|
433 |
//lorna |
|
434 |
if ($view) { |
|
435 |
drupal_set_message(t('in override batch WITH VIEW ')); |
|
436 |
} else { |
|
437 |
drupal_set_message(t('in override batch: ')); |
|
438 |
} |
|
439 | 419 |
static $_views; |
440 | 420 |
if (isset($view)) { |
441 | 421 |
|
442 |
//lorna |
|
443 |
drupal_set_message(t('in override batch with view: ') . $view->name); |
|
444 | 422 |
$_views[$view->name][$display] = $options; |
445 | 423 |
} |
446 | 424 |
return $_views; |
... | ... | |
458 | 436 |
|
459 | 437 |
$view_name = $batch['view_name']; |
460 | 438 |
$display_id = $batch['display_id']; |
461 |
|
|
462 |
//lorna |
|
463 |
drupal_set_message(t('in batch alter 1: ') ); |
|
464 | 439 |
|
465 | 440 |
$ok_to_override = _dwca_export_views_data_export_override_batch(); |
466 | 441 |
|
... | ... | |
491 | 466 |
*/ |
492 | 467 |
function dwca_export_batch_alter(&$batch, &$final_destination, &$querystring) { |
493 | 468 |
|
494 |
//lorna |
|
495 |
drupal_set_message(t('in batch alter 2: ') ); |
|
496 | 469 |
if($batch['source_url'] == 'dwca_export'){ |
497 | 470 |
$batch['progressive'] = FALSE; |
498 | 471 |
} |
... | ... | |
518 | 491 |
// Get path to temp file |
519 | 492 |
$temp_file = $view->display_handler->outputfile_path(); |
520 | 493 |
|
521 |
//lorna - there's no file_name for description |
|
522 |
drupal_set_message(t('CALLING _dwca_export_archive_descriptor_file_map WITH OUTPUT_FILE: ') . $output_file . t(' and temp_FILE: ') . $temp_file); |
|
523 | 494 |
_dwca_export_archive_descriptor_file_map($output_file, $temp_file); |
524 | 495 |
|
525 | 496 |
} |
Also available in: Unified diff
removed debugging code