Project

General

Profile

« Previous | Next » 

Revision 1c30a02b

Added by Andreas Kohlbecker almost 3 years ago

ref #8543 fix missing footnoteListKey default fallback

View differences:

modules/cdm_dataportal/includes/footnotes.inc
65 65

  
66 66
  $sources = cdm_entity_sources_sorted($cdm_entity);
67 67

  
68
  if (!isset($footnote_list_key_suggestion) || !$footnote_list_key_suggestion) {
69
    $footnote_list_key_suggestion = RenderHints::getFootnoteListKey();
70
  }
71

  
68 72
  // Annotations as footnotes.
69 73
  $footnote_keys = cdm_entity_annotations_as_footnote_keys($cdm_entity, $footnote_list_key_suggestion);
70 74

  
......
75 79
    $original_source_footnote_tag = $bibliography_settings['enabled'] == 1 ? 'div' : null; // null will cause bibliography_footnote_list_key to use the default
76 80
  } else {
77 81
    $sources_footnote_list_key = $footnote_list_key_suggestion;
78
    if(!$sources_footnote_list_key) {
79
      RenderHints::getFootnoteListKey();
80
    }
81 82
    $original_source_footnote_tag = NULL;
82 83
  }
83 84

  
......
225 226
    return '';
226 227
  }
227 228

  
229
  if (!isset($footnote_list_key) || !$footnote_list_key) {
230
    $footnote_list_key = RenderHints::getFootnoteListKey();
231
  }
232

  
228 233
  $out = '<' . $element_tag . ' class="footnotes footnotes-' . $footnote_list_key . ' ">'
229 234
    . FootnoteManager::renderFootnoteList($footnote_list_key)
230 235
    . '</' . $element_tag . '>';
modules/cdm_dataportal/includes/name.inc
701 701
      $render_array['nomenclatural_act']['#weight'] + 10 );
702 702
  }
703 703

  
704
  $render_array['nomenclatural_act']['footnotes'] = markup_to_render_array(render_footnotes(),
705
    100
706
  );
704
  $render_array['nomenclatural_act']['footnotes'] = markup_to_render_array(render_footnotes(),100);
707 705

  
708 706
  // registration date and office
709 707
  $registration_date_insitute_markup = render_registration_date_and_institute($registration_dto);
src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Cichorieae_FootnoteTest.java
41 41
    public void crepidiastrum_chelidoniifolium_issue_2772() throws MalformedURLException {
42 42
        TaxonSynonymyPage p = new TaxonSynonymyPage(driver, getContext(), crepidiastrum_chelidoniifolium_uuid);
43 43
        String expectedName = "Crepidiastrum chelidoniifolium";
44
        assertEquals(getContext().prepareTitle(expectedName), driver.getTitle());
44
        assertEquals(getContext().prepareTitle(expectedName), p.getTitle());
45 45

  
46 46
        assertEquals("expecting one footnoteKey", 1, p.getHeterotypicalGroupFootNoteKeys(2).size());
47 47
        List<BaseElement> footNotes = p.getHeterotypicalGroupFootNotes(2);

Also available in: Unified diff