Skip to content

Commit

Permalink
Fix: #4864 - show married names on death report
Browse files Browse the repository at this point in the history
  • Loading branch information
fisharebest committed Aug 14, 2023
1 parent f5da807 commit 4d19d8c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/Report/ReportParserGenerate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand 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;
Expand All @@ -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;

Expand Down Expand Up @@ -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;
}

Expand Down
6 changes: 6 additions & 0 deletions resources/xml/reports/death_report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@
<TextBox width="200">
<Text style="text"><GetPersonName id="" />
<if condition="$adlist=='_MARNM'">
<RepeatTag tag="NAME">
<if condition="@NAME:TYPE=='married'">
<br /><GedcomValue tag="NAME" />
</if>
</RepeatTag>

<RepeatTag tag="NAME:_MARNM">
<br /><GedcomValue tag="_MARNM" />
</RepeatTag>
Expand Down

0 comments on commit 4d19d8c

Please sign in to comment.