diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2019-11-03 07:54:20 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2019-11-03 07:54:20 +0000 |
| commit | 12b72f5fcdef177f362e859e320441a0eca3002b (patch) | |
| tree | 273cacf1a9d0efd61b47316920b76c4f2a2cc28e /app/Http/RequestHandlers/PendingChanges.php | |
| parent | 82f846cb6e186be86dd0b3b6127aef20731bc08f (diff) | |
| download | webtrees-12b72f5fcdef177f362e859e320441a0eca3002b.tar.gz webtrees-12b72f5fcdef177f362e859e320441a0eca3002b.tar.bz2 webtrees-12b72f5fcdef177f362e859e320441a0eca3002b.zip | |
Fix: workflow for accepting pending changes in other trees
Diffstat (limited to 'app/Http/RequestHandlers/PendingChanges.php')
| -rw-r--r-- | app/Http/RequestHandlers/PendingChanges.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/app/Http/RequestHandlers/PendingChanges.php b/app/Http/RequestHandlers/PendingChanges.php index 67cae33ddd..e29616fa75 100644 --- a/app/Http/RequestHandlers/PendingChanges.php +++ b/app/Http/RequestHandlers/PendingChanges.php @@ -115,7 +115,7 @@ class PendingChanges implements RequestHandlerInterface break; } - $changes[$row->gedcom_id][$row->xref][] = $row; + $changes[$row->gedcom_name][$row->xref][] = $row; } $title = I18N::translate('Pending changes'); @@ -123,17 +123,18 @@ class PendingChanges implements RequestHandlerInterface // If the current tree has changes, activate that tab. Otherwise activate the first tab. if (($changes[$tree->id()] ?? []) === []) { reset($changes); - $active_tree_id = key($changes); + $active_tree_name = key($changes); } else { - $active_tree_id = $tree->id(); + $active_tree_name = $tree->name(); } return $this->viewResponse('pending-changes-page', [ - 'active_tree_id' => $active_tree_id, - 'changes' => $changes, - 'title' => $title, - 'tree' => $tree, - 'url' => $url, + 'active_tree_name' => $active_tree_name, + 'changes' => $changes, + 'title' => $title, + 'tree' => $tree, + 'trees' => $this->tree_service->all(), + 'url' => $url, ]); } } |
