Revision 8ec609a4
Added by Andreas Kohlbecker over 2 years ago
modules/cdm_dataportal/includes/media.inc | ||
---|---|---|
992 | 992 |
|
993 | 993 |
// Title. |
994 | 994 |
if ($doTitle) { |
995 |
$title_string = $media_metadata['title'] |
|
996 |
. $annotations_and_sources->footNoteKeysMarkup(); // placing the footnote keys here is not optimal, see #6329 A.1. |
|
995 |
$title_string = $media_metadata['title']; |
|
997 | 996 |
$title_string = trim($title_string); |
998 |
if (empty($title_string) && !($doDescription && $media_metadata['description'])) {
|
|
997 |
if (!isset_not_empty($title_string) && !($doDescription && isset_not_empty($media_metadata['description']))) {
|
|
999 | 998 |
// Use filename as fallback option if no description and no source citations are available. |
1000 | 999 |
$title_string = $media_metadata['filename']; |
1001 | 1000 |
} |
1001 |
$title_string .= $annotations_and_sources->footNoteKeysMarkup(); // placing the footnote keys here is not optimal, see #6329 A.1. |
|
1002 | 1002 |
$render_array['title'] = markup_to_render_array('<div class="title">' . $title_string . '</div>'); |
1003 | 1003 |
} |
1004 | 1004 |
|
Also available in: Unified diff
avoiding empty titles with dangling footnote key in media gallery