From 72d49ceedf256aedf1b97871f100dc61df3fd16b Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Mon, 14 Aug 2023 14:34:01 +0100 Subject: [PATCH] Fix: #4864 - show married names on death report --- app/Report/ReportParserGenerate.php | 8 ++++++++ resources/xml/reports/death_report.xml | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/app/Report/ReportParserGenerate.php b/app/Report/ReportParserGenerate.php index 67b1c544e85..94713ccdaf5 100644 --- a/app/Report/ReportParserGenerate.php +++ b/app/Report/ReportParserGenerate.php @@ -61,6 +61,7 @@ use function imagesx; use function imagesy; use function in_array; +use function ltrim; use function method_exists; use function preg_match; use function preg_match_all; @@ -71,10 +72,12 @@ use function round; use function sprintf; use function str_contains; +use function str_ends_with; use function str_replace; use function str_starts_with; use function strip_tags; use function strlen; +use function strpos; use function strtoupper; use function substr; use function trim; @@ -89,6 +92,7 @@ use function xml_set_character_data_handler; use function xml_set_element_handler; +use const PREG_OFFSET_CAPTURE; use const PREG_SET_ORDER; use const XML_OPTION_CASE_FOLDING; @@ -2805,6 +2809,10 @@ private function getGedcomValue(string $tag, int $level, string $gedrec): string $value .= self::getCont($level + 1, $subrec); } + if ($tag === 'NAME' || $tag === '_MARNM' || $tag === '_AKA') { + return strtr($value, ['/' => '']); + } + return $value; } diff --git a/resources/xml/reports/death_report.xml b/resources/xml/reports/death_report.xml index 09228e3d858..9ff351db7f8 100644 --- a/resources/xml/reports/death_report.xml +++ b/resources/xml/reports/death_report.xml @@ -60,6 +60,12 @@ + + +
+
+
+