1083 |
1083 |
//show the taxa list or go to the singular taxon
|
1084 |
1084 |
if (sizeof($taxon_pager->records) == 1){ //sigle taxon case
|
1085 |
1085 |
reset($taxon_pager->records);
|
1086 |
|
$first_key = key($taxon_pager->records);
|
1087 |
|
if($taxon_pager->records[$first_key]->class != "Taxon"){
|
1088 |
|
$taxon = cdm_ws_get(CDM_WS_PORTAL_TAXON_ACCEPTED, array($taxon_pager->records[$first_key]->uuid, get_taxonomictree_uuid_selected()));
|
|
1086 |
$singleTaxon = $taxon_pager->records[0];
|
|
1087 |
if($singleTaxon->class != "Taxon"){
|
|
1088 |
// it is a Synonym -> look for the accepted
|
|
1089 |
$taxon = cdm_ws_get(CDM_WS_PORTAL_TAXON_ACCEPTED, array($singleTaxon->uuid, get_taxonomictree_uuid_selected()));
|
1089 |
1090 |
if($synonym_uuid){
|
1090 |
1091 |
drupal_goto('cdm_dataportal/taxon/' . $taxon[0]->uuid . '/synonymy', 'highlite=' . $synonym_uuid);
|
1091 |
|
}else{
|
1092 |
|
drupal_goto('cdm_dataportal/taxon/' . $taxon[0]->uuid);
|
|
1092 |
}else {
|
|
1093 |
drupal_goto('cdm_dataportal/taxon/' . $taxon[0]->uuid . '/synonymy', 'highlite=' . $singleTaxon->uuid);
|
1093 |
1094 |
}
|
1094 |
1095 |
}else{
|
|
1096 |
// it is an accepted taxon
|
1095 |
1097 |
if($synonym_uuid){
|
1096 |
|
drupal_goto('cdm_dataportal/taxon/' . $taxon_pager->records[$first_key]->uuid . '/synonymy',
|
1097 |
|
'highlite=' . $synonym_uuid);
|
|
1098 |
drupal_goto('cdm_dataportal/taxon/' . $singleTaxon->uuid . '/synonymy', 'highlite=' . $synonym_uuid);
|
1098 |
1099 |
}else{
|
1099 |
|
drupal_goto('cdm_dataportal/taxon/' . $taxon_pager->records[$first_key]->uuid);
|
|
1100 |
drupal_goto('cdm_dataportal/taxon/' . $singleTaxon->uuid);
|
1100 |
1101 |
}
|
1101 |
|
//drupal_goto('cdm_dataportal/taxon/' . $taxon_pager->records[$first_key]->uuid);
|
1102 |
1102 |
}
|
1103 |
1103 |
}else{ //more than one taxa case
|
1104 |
1104 |
$taxon_name_page->title = theme('cdm_name_page_title', $taxon_name);
|
... | ... | |
1165 |
1165 |
|
1166 |
1166 |
if (!$tab){
|
1167 |
1167 |
return 'cdm_dataportal/taxon/'.$uuid;
|
1168 |
|
}elseif(get_last_taxon_page_tab() &&
|
1169 |
|
$tab == $values[CDM_DATAPORTAL_LAST_VISITED_TAB_ARRAY_INDEX]){
|
|
1168 |
}else if(get_last_taxon_page_tab() && $tab == $values[CDM_DATAPORTAL_LAST_VISITED_TAB_ARRAY_INDEX]){
|
1170 |
1169 |
return 'cdm_dataportal/taxon/'.$uuid . '/' . get_last_taxon_page_tab();
|
1171 |
1170 |
} else {
|
1172 |
1171 |
return 'cdm_dataportal/taxon/'.$uuid . '/' . strtolower($tab);
|
fixing #2612