diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2024-12-07 14:25:17 +0000 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2024-12-07 14:25:27 +0000 |
| commit | 0babb47ba46ee41b584a211f1fb7b933d6a47ad5 (patch) | |
| tree | 7d6819f5e2d6deff66571a02f9c0521351489176 | |
| parent | 589852a34aba5fc1521a5aecbcc75a9a0099eaf8 (diff) | |
| download | webtrees-0babb47ba46ee41b584a211f1fb7b933d6a47ad5.tar.gz webtrees-0babb47ba46ee41b584a211f1fb7b933d6a47ad5.tar.bz2 webtrees-0babb47ba46ee41b584a211f1fb7b933d6a47ad5.zip | |
Fix: #5064 - wrong default parameters in URL for relationship chart
| -rw-r--r-- | app/Module/RelationshipsChartModule.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/app/Module/RelationshipsChartModule.php b/app/Module/RelationshipsChartModule.php index 444df75353..2692f04343 100644 --- a/app/Module/RelationshipsChartModule.php +++ b/app/Module/RelationshipsChartModule.php @@ -194,10 +194,17 @@ class RelationshipsChartModule extends AbstractModule implements ModuleChartInte */ public function chartUrl(Individual $individual, array $parameters = []): string { + $tree = $individual->tree(); + $ancestors_only = (int) $tree->getPreference('RELATIONSHIP_ANCESTORS', static::DEFAULT_ANCESTORS); + $max_recursion = (int) $tree->getPreference('RELATIONSHIP_RECURSION', static::DEFAULT_RECURSION); + + return route(static::class, [ - 'xref' => $individual->xref(), - 'tree' => $individual->tree()->name(), - ] + $parameters + self::DEFAULT_PARAMETERS); + 'xref' => $individual->xref(), + 'tree' => $individual->tree()->name(), + 'ancestors' => $ancestors_only, + 'recursion' => $max_recursion, + ] + $parameters); } /** |
