Revision 439f531a
Added by Andreas Kohlbecker over 5 years ago
modules/cdm_dataportal/includes/taxon.inc | ||
---|---|---|
82 | 82 |
|
83 | 83 |
RenderHints::pushToRenderStack('misapplied_name_for'); // TODO the render path string should in future come from $taxonRelation->type->... |
84 | 84 |
|
85 |
// using name tags + author as full name key |
|
86 |
$full_name_key = join(' ', cdm_tagged_text_values($taxon_relation->taggedText, array('name', 'authors'))); |
|
85 |
// full name with relation symbol, rel sec as deduplication key |
|
86 |
// the sensu part will be removed from the key below in case it is present |
|
87 |
$symbol_text = join(' ', cdm_tagged_text_values($taxon_relation->taggedText, array('symbol'))); |
|
88 |
$name_text = join(' ', cdm_tagged_text_values($taxon_relation->taggedText, array('name'))); |
|
89 |
// remove quotes surrounding the name |
|
90 |
$name_text = str_replace('"', '', $name_text); |
|
91 |
$name_text = str_replace('"', '', $name_text); |
|
92 |
$full_name_key = $name_text . ' ' . cdm_tagged_text_to_string($taxon_relation->taggedText, array('name', 'symbol')) . " " . $symbol_text; |
|
87 | 93 |
|
88 | 94 |
// Render the first name found as representative for all others. |
89 | 95 |
//###OLD: $misapplied[$name]['out'] = cdm_related_taxon($taxon_relation->fromTaxon, UUID_MISAPPLIED_NAME_FOR); |
90 | 96 |
$sensu_tagged_text = tagged_text_extract_secref($taxon_relation->taggedText, "secReference", true); |
91 | 97 |
$relsec_tagged_text = tagged_text_extract_secref($taxon_relation->taggedText, "relSecReference", true); |
92 | 98 |
|
99 |
|
|
93 | 100 |
if (isset($sensu_tagged_text[1])) { |
101 |
// everything else needs to be equal except for MAN.sec and MAN.secDetail. see #7658#note-21 |
|
102 |
$full_name_key = str_replace(cdm_tagged_text_to_string($sensu_tagged_text), ' ', $full_name_key); |
|
94 | 103 |
array_shift($sensu_tagged_text); // remove first element which contains the "sensu", this will be added later in this code |
95 | 104 |
$sensu_citation_short_markup = cdm_tagged_text_to_markup($sensu_tagged_text); |
96 | 105 |
$sensu_citation_short = cdm_tagged_text_to_string($sensu_tagged_text); |
Also available in: Unified diff
ref #7658 MAN deduplication by full MAN representation except sensu reference