diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2022-02-02 08:19:33 +0000 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2022-02-02 08:19:33 +0000 |
| commit | 09a0b4d0e7de5551c84c29d4d3789a7dd3aac53a (patch) | |
| tree | 9611e4a02e40c01fc23fcddc86775404dbaaa400 /app | |
| parent | f3b2e3232e537772640b5cbe5fc822bb68d98fe1 (diff) | |
| download | webtrees-09a0b4d0e7de5551c84c29d4d3789a7dd3aac53a.tar.gz webtrees-09a0b4d0e7de5551c84c29d4d3789a7dd3aac53a.tar.bz2 webtrees-09a0b4d0e7de5551c84c29d4d3789a7dd3aac53a.zip | |
Fix: #3532 - only show age of parents for the individual's own facts
Diffstat (limited to 'app')
| -rw-r--r-- | app/Functions/FunctionsPrint.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/Functions/FunctionsPrint.php b/app/Functions/FunctionsPrint.php index be56b857b3..bfa71ca7da 100644 --- a/app/Functions/FunctionsPrint.php +++ b/app/Functions/FunctionsPrint.php @@ -269,7 +269,11 @@ class FunctionsPrint $html .= ' – <span class="date">' . $match[1] . '</span>'; } if ($record instanceof Individual) { - if (in_array($fact, Gedcom::BIRTH_EVENTS, true) && $record->tree()->getPreference('SHOW_PARENTS_AGE')) { + if ( + in_array($fact, Gedcom::BIRTH_EVENTS, true) && + $record === $event->record() && + $record->tree()->getPreference('SHOW_PARENTS_AGE') === '1' + ) { // age of parents at child birth $html .= self::formatParentsAges($record, $date); } |
