Project

General

Profile

Revision 6679207a

ID6679207a899188bbae8fba986cf4655a6fd2e87d
Parent ad6ad4c6
Child f02e26e1

Added by Andreas Kohlbecker about 2 months ago

ref #9222 adapting dataportal and tests to single sourced classes

View differences:

modules/cdm_dataportal/includes/taxon.inc
380 380
  // Now rendering starts ..
381 381
  RenderHints::pushToRenderStack('related_taxon');
382 382

  
383
  if (isset($taxon->name->nomenclaturalReference)) {
384
    $referenceUri = url(path_to_reference($taxon->name->nomenclaturalReference->uuid));
383
  if (isset($taxon->name->nomenclaturalSource->citation)) {
384
    $referenceUri = url(path_to_reference($taxon->name->nomenclaturalSource->citation->uuid));
385 385
  }
386 386
  $taxonUri = '';
387 387
  if ($doLinkTaxon) {
......
464 464
    $out .= '<span class="acceptedFor">';
465 465
    $out .= t('is accepted for ');
466 466
    $referenceUri = null;
467
    if (isset($synonym->name->nomenclaturalReference)) {
468
      $referenceUri = url(path_to_reference($synonym->name->nomenclaturalReference->uuid));
467
    if (isset($synonym->name->nomenclaturalSource->citation)) {
468
      $referenceUri = url(path_to_reference($synonym->name->nomenclaturalSource->citation->uuid));
469 469
    }
470 470
    $out .= render_taxon_or_name($synonym->name, NULL, $referenceUri);
471 471
    $annotations_and_sources = handle_annotations_and_sources(
......
576 576

  
577 577
          $taxonUri = uri_to_synonym($taxon->uuid, $acceptedTaxon->uuid);
578 578
          $referenceUri = '';
579
          if (isset($acceptedTaxon->name->nomenclaturalReference)) {
580
            $referenceUri = url(path_to_reference($acceptedTaxon->name->nomenclaturalReference->uuid));
579
          if (isset($acceptedTaxon->name->nomenclaturalSource->citation)) {
580
            $referenceUri = url(path_to_reference($acceptedTaxon->name->nomenclaturalSource->citation->uuid));
581 581
          }
582 582
          $taxon_or_name = $is_synonym ? $taxon->name : $taxon;
583 583
          // $taxon_or_name this is a trick to suppress the sec reference for synonyms
......
615 615
      // Its a Taxon.
616 616
      $taxonUri = url(path_to_taxon($taxon->uuid));
617 617
      $referenceUri = '';
618
      if (isset($taxon->name->nomenclaturalReference)) {
619
        $referenceUri = url(path_to_reference($taxon->name->nomenclaturalReference->uuid));
618
      if (isset($taxon->name->nomenclaturalSource->citation)) {
619
        $referenceUri = url(path_to_reference($taxon->name->nomenclaturalSource->citation->uuid));
620 620
      }
621 621
      $out .= '<div class="item Taxon">' . render_taxon_or_name($taxon, $taxonUri, $referenceUri);
622 622
      if ($show_classification) {

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)