Project

General

Profile

Revision 850092a7

ID850092a77002da04822cb23ce097e58b05ecbd5d
Parent 8a1b451e
Child 02f3768c

Added by Andreas Kohlbecker over 3 years ago

fix #7691 supressing bibliography when content is empty

View differences:

modules/cdm_dataportal/includes/pages.inc
785 785
  // Bibliography
786 786
  $bibliography_settings = get_bibliography_settings();
787 787
  if($bibliography_settings['enabled'] == 1){
788
    $feature_bibliography = make_pseudo_feature('Bibliography', 'BIBLIOGRAPHY');
789
    $bibliography_block = feature_block(t('Bibliography'), $feature_bibliography);
790
    $bibliography_item = markup_to_render_array(FootnoteManager::renderFootnoteList('BIBLIOGRAPHY', ''));
791
    $bibliography_block->content[] = compose_feature_block_wrap_elements(array($bibliography_item), $feature_bibliography);
788
    $bibliography_markup = FootnoteManager::renderFootnoteList('BIBLIOGRAPHY', '');
789
    if($bibliography_markup) {
790
      $feature_bibliography = make_pseudo_feature('Bibliography', 'BIBLIOGRAPHY');
791
      $bibliography_block = feature_block(t('Bibliography'), $feature_bibliography);
792
      $bibliography_item = markup_to_render_array($bibliography_markup);
793
      $bibliography_block->content[] = compose_feature_block_wrap_elements(array($bibliography_item), $feature_bibliography);
792 794

  
793
    if(!empty($bibliography_block->content)){
794 795
      $pseudo_feature_block_toc_items['Bibliography']= 'bibliography';
795 796
      $pseudo_feature_blocks[] = $bibliography_block;
796 797
    }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)