12279b4f3SGreg Roach<?php 22279b4f3SGreg Roach 32279b4f3SGreg Roach/** 42279b4f3SGreg Roach * webtrees: online genealogy 52279b4f3SGreg Roach * Copyright (C) 2019 webtrees development team 62279b4f3SGreg Roach * This program is free software: you can redistribute it and/or modify 72279b4f3SGreg Roach * it under the terms of the GNU General Public License as published by 82279b4f3SGreg Roach * the Free Software Foundation, either version 3 of the License, or 92279b4f3SGreg Roach * (at your option) any later version. 102279b4f3SGreg Roach * This program is distributed in the hope that it will be useful, 112279b4f3SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 122279b4f3SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 132279b4f3SGreg Roach * GNU General Public License for more details. 142279b4f3SGreg Roach * You should have received a copy of the GNU General Public License 152279b4f3SGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>. 162279b4f3SGreg Roach */ 172279b4f3SGreg Roach 182279b4f3SGreg Roachdeclare(strict_types=1); 192279b4f3SGreg Roach 202279b4f3SGreg Roachnamespace Fisharebest\Webtrees\Http\Routes; 212279b4f3SGreg Roach 222279b4f3SGreg Roachuse Aura\Router\Map; 232279b4f3SGreg Roachuse Fig\Http\Message\RequestMethodInterface; 242279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\Middleware\AuthAdministrator; 252279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\Middleware\AuthEditor; 262279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\Middleware\AuthLoggedIn; 272279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\Middleware\AuthManager; 282279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\Middleware\AuthMember; 292279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\Middleware\AuthModerator; 302279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AccountDelete; 312279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AccountEdit; 322279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AccountUpdate; 337c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddChildToFamilyAction; 347c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddChildToFamilyPage; 357c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddChildToIndividualAction; 367c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddChildToIndividualPage; 377c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddName; 382279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddNewFact; 397c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddParentToIndividualAction; 407c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddParentToIndividualPage; 417c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddSpouseToFamilyAction; 427c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddSpouseToFamilyPage; 437c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddSpouseToIndividualAction; 447c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddSpouseToIndividualPage; 457c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddUnlinkedAction; 467c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddUnlinkedPage; 4746431a62SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AppleTouchIconPng; 48e381f98dSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\BroadcastAction; 49e381f98dSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\BroadcastPage; 5043322877SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ChangeFamilyMembersAction; 5143322877SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ChangeFamilyMembersPage; 522279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\CleanDataFolder; 53e381f98dSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ContactAction; 54e381f98dSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ContactPage; 552279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel; 562279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\CopyFact; 572279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\CreateMediaObjectAction; 582279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\CreateMediaObjectModal; 592279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\CreateNoteAction; 602279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\CreateNoteModal; 612279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\CreateRepositoryAction; 622279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\CreateRepositoryModal; 632279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\CreateSourceAction; 642279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\CreateSourceModal; 652279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\CreateSubmitterAction; 662279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\CreateSubmitterModal; 672279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\CreateTreeAction; 682279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\CreateTreePage; 69ce42304aSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\DataFixChoose; 7055749c76SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\DataFixData; 7155749c76SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\DataFixPage; 72ce42304aSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\DataFixPreview; 73ce42304aSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\DataFixSelect; 7455749c76SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\DataFixUpdate; 7555749c76SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\DataFixUpdateAll; 762279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\DeleteFact; 772279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\DeletePath; 782279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\DeleteRecord; 792279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\DeleteTreeAction; 802279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\DeleteUser; 8155749c76SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\EditFactAction; 82a53fee79SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\EditFactPage; 837c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\EditName; 842279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\EditRawFactAction; 852279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\EditRawFactPage; 862279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\EditRawRecordAction; 872279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\EditRawRecordPage; 88901ade19SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\EmailPreferencesAction; 89901ade19SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\EmailPreferencesPage; 906d576906SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ExportGedcomClient; 916d576906SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ExportGedcomPage; 926d576906SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ExportGedcomServer; 932279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\FamilyPage; 9446431a62SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\FaviconIco; 952279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\GedcomRecordPage; 961635452cSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\HeaderPage; 972279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\HelpText; 982279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\HomePage; 992279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\IndividualPage; 1007c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\LinkChildToFamilyAction; 1017c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\LinkChildToFamilyPage; 1027c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\LinkSpouseToIndividualAction; 1037c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\LinkSpouseToIndividualPage; 1042279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\LoginAction; 1052279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\LoginPage; 1062279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\Logout; 107040e7dbaSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\Masquerade; 1082279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\MediaPage; 1095bbfbb82SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\MergeFactsAction; 1105bbfbb82SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\MergeFactsPage; 1115bbfbb82SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\MergeRecordsAction; 1125bbfbb82SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\MergeRecordsPage; 113e381f98dSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\MessageAction; 114e381f98dSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\MessagePage; 115e381f98dSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\MessageSelect; 1162279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction; 1172279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\NotePage; 1182279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PasswordRequestAction; 1192279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PasswordRequestPage; 1202279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PasswordResetAction; 1212279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PasswordResetPage; 1222279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PasteFact; 1232279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChanges; 1242279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesAcceptChange; 1252279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesAcceptRecord; 1262279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesAcceptTree; 1272279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogAction; 1282279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogData; 1292279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogDelete; 1302279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogDownload; 1312279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogPage; 1322279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesRejectChange; 1332279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesRejectRecord; 1342279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesRejectTree; 1352279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PhpInformation; 1362279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\Ping; 1372279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\RegisterAction; 1382279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\RegisterPage; 1392279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ReorderChildrenAction; 1402279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ReorderChildrenPage; 141901ade19SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ReorderFamiliesAction; 142901ade19SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ReorderFamiliesPage; 1432279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ReorderMediaAction; 1442279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ReorderMediaPage; 1452279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ReorderNamesAction; 1462279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ReorderNamesPage; 1472279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ReportGenerate; 1482279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ReportListAction; 1492279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ReportListPage; 1502279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ReportSetupAction; 1512279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ReportSetupPage; 1522279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\RepositoryPage; 1532279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\RobotsTxt; 1542279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SearchAdvancedAction; 1552279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SearchAdvancedPage; 1562279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SearchGeneralAction; 1572279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SearchGeneralPage; 1582279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SearchPhoneticAction; 1592279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SearchPhoneticPage; 1602279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SearchQuickAction; 1612279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SearchReplaceAction; 1622279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SearchReplacePage; 1632279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\Select2Family; 1642279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\Select2Individual; 1652279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\Select2MediaObject; 1662279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\Select2Note; 167a60f9d1cSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\Select2Place; 1682279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\Select2Repository; 1692279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\Select2Source; 1702279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\Select2Submitter; 1712279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SelectDefaultTree; 1722279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SelectLanguage; 1732279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SelectNewFact; 1742279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SelectTheme; 1752279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SiteLogsAction; 1762279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SiteLogsData; 1772279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SiteLogsDelete; 1782279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SiteLogsDownload; 1792279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SiteLogsPage; 180c7aa856bSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SitePreferencesAction; 181c7aa856bSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SitePreferencesPage; 182c7aa856bSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SiteRegistrationAction; 183c7aa856bSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SiteRegistrationPage; 1842279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SourcePage; 1851635452cSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SubmissionPage; 186ffc0a61fSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SubmitterPage; 1878e0e1b25SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\TreePage; 1888e0e1b25SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\TreePageBlock; 1898e0e1b25SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\TreePageBlockEdit; 1908e0e1b25SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\TreePageBlockUpdate; 1918e0e1b25SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\TreePageDefaultEdit; 1928e0e1b25SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\TreePageDefaultUpdate; 1938e0e1b25SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\TreePageEdit; 1948e0e1b25SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\TreePageUpdate; 19596716c47SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\UnconnectedAction; 19696716c47SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\UnconnectedPage; 1978e0e1b25SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\UserPage; 1988e0e1b25SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\UserPageBlock; 1998e0e1b25SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\UserPageBlockEdit; 2008e0e1b25SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\UserPageBlockUpdate; 2018e0e1b25SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\UserPageDefaultEdit; 2028e0e1b25SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\UserPageDefaultUpdate; 2038e0e1b25SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\UserPageEdit; 2048e0e1b25SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\UserPageUpdate; 2052474349cSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\UsersCleanupAction; 2062474349cSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\UsersCleanupPage; 2072279b4f3SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\VerifyEmail; 2082279b4f3SGreg Roach 2092279b4f3SGreg Roach/** 2102279b4f3SGreg Roach * Routing table for web requests 2112279b4f3SGreg Roach */ 2122279b4f3SGreg Roachclass WebRoutes 2132279b4f3SGreg Roach{ 2142279b4f3SGreg Roach public function load(Map $router): void 2152279b4f3SGreg Roach { 216901ade19SGreg Roach $router->attach('', '', static function (Map $router) { 2172279b4f3SGreg Roach // Admin routes. 2182279b4f3SGreg Roach $router->attach('', '/admin', static function (Map $router) { 2192279b4f3SGreg Roach $router->extras([ 220901ade19SGreg Roach 'middleware' => [ 221901ade19SGreg Roach AuthAdministrator::class, 222901ade19SGreg Roach ], 2232279b4f3SGreg Roach ]); 2242279b4f3SGreg Roach 225b4144a6dSGreg Roach $router->get(ControlPanel::class, '', ControlPanel::class); 226b4144a6dSGreg Roach $router->get(BroadcastPage::class, '/broadcast', BroadcastPage::class); 227b4144a6dSGreg Roach $router->post(BroadcastAction::class, '/broadcast', BroadcastAction::class); 228b4144a6dSGreg Roach $router->get(CleanDataFolder::class, '/clean', CleanDataFolder::class); 229b4144a6dSGreg Roach $router->post(DeletePath::class, '/delete-path', DeletePath::class); 230b4144a6dSGreg Roach $router->get(EmailPreferencesPage::class, '/email', EmailPreferencesPage::class); 231b4144a6dSGreg Roach $router->post(EmailPreferencesAction::class, '/email', EmailPreferencesAction::class); 232b4144a6dSGreg Roach $router->get(PhpInformation::class, '/information', PhpInformation::class); 233b4144a6dSGreg Roach $router->get(SiteLogsPage::class, '/logs', SiteLogsPage::class); 234b4144a6dSGreg Roach $router->post(SiteLogsAction::class, '/logs', SiteLogsAction::class); 235b4144a6dSGreg Roach $router->get(SiteLogsData::class, '/logs-data', SiteLogsData::class); 236b4144a6dSGreg Roach $router->post(SiteLogsDelete::class, '/logs-delete', SiteLogsDelete::class); 237b4144a6dSGreg Roach $router->get(SiteLogsDownload::class, '/logs-download', SiteLogsDownload::class); 238b4144a6dSGreg Roach $router->post(Masquerade::class, '/masquerade/{user_id}', Masquerade::class); 2393d180ba8SGreg Roach $router->get('admin-media', '/media', 'Admin\MediaController::index'); 2403d180ba8SGreg Roach $router->post('admin-media-select', '/media', 'Admin\MediaController::select'); 2413d180ba8SGreg Roach $router->get('admin-media-data', '/media-data', 'Admin\MediaController::data'); 2423d180ba8SGreg Roach $router->get('admin-media-upload', '/media-upload', 'Admin\MediaController::upload'); 2433d180ba8SGreg Roach $router->post('admin-media-upload-action', '/media-upload', 'Admin\MediaController::uploadAction'); 244b4144a6dSGreg Roach $router->get(CreateTreePage::class, '/trees/create', CreateTreePage::class); 245b4144a6dSGreg Roach $router->post(CreateTreeAction::class, '/trees/create', CreateTreeAction::class); 246b4144a6dSGreg Roach $router->post(SelectDefaultTree::class, '/trees/default/{tree}', SelectDefaultTree::class); 247b4144a6dSGreg Roach $router->post(DeleteTreeAction::class, '/trees/delete/{tree}', DeleteTreeAction::class); 2482279b4f3SGreg Roach $router->get('admin-fix-level-0-media', '/fix-level-0-media', 'Admin\FixLevel0MediaController::fixLevel0Media'); 2492279b4f3SGreg Roach $router->post('admin-fix-level-0-media-action', '/fix-level-0-media', 'Admin\FixLevel0MediaController::fixLevel0MediaAction'); 2502279b4f3SGreg Roach $router->get('admin-fix-level-0-media-data', '/fix-level-0-media-data', 'Admin\FixLevel0MediaController::fixLevel0MediaData'); 2512279b4f3SGreg Roach $router->get('admin-webtrees1-thumbs', '/webtrees1-thumbs', 'Admin\ImportThumbnailsController::webtrees1Thumbnails'); 2522279b4f3SGreg Roach $router->post('admin-webtrees1-thumbs-action', '/webtrees1-thumbs', 'Admin\ImportThumbnailsController::webtrees1ThumbnailsAction'); 2532279b4f3SGreg Roach $router->get('admin-webtrees1-thumbs-data', '/webtrees1-thumbs-data', 'Admin\ImportThumbnailsController::webtrees1ThumbnailsData'); 2542279b4f3SGreg Roach $router->get('modules', '/modules', 'Admin\ModuleController::list'); 2552279b4f3SGreg Roach $router->post('modules-update', '/modules', 'Admin\ModuleController::update'); 2562279b4f3SGreg Roach $router->get('analytics', '/analytics', 'Admin\ModuleController::listAnalytics'); 2572279b4f3SGreg Roach $router->post('analytics-update', '/analytics', 'Admin\ModuleController::updateAnalytics'); 2582279b4f3SGreg Roach $router->get('blocks', '/blocks', 'Admin\ModuleController::listBlocks'); 2592279b4f3SGreg Roach $router->post('blocks-update', '/blocks', 'Admin\ModuleController::updateBlocks'); 2602279b4f3SGreg Roach $router->get('charts', '/charts', 'Admin\ModuleController::listCharts'); 2612279b4f3SGreg Roach $router->post('charts-update', '/charts', 'Admin\ModuleController::updateCharts'); 262f12b2c6dSGreg Roach $router->get('data-fixes', '/data-fixes', 'Admin\ModuleController::listDataFixes'); 263f12b2c6dSGreg Roach $router->post('data-fixes-update', '/data-fixes', 'Admin\ModuleController::updateDataFixes'); 2642279b4f3SGreg Roach $router->get('lists', '/lists', 'Admin\ModuleController::listLists'); 2652279b4f3SGreg Roach $router->post('lists-update', '/lists', 'Admin\ModuleController::updateLists'); 2662279b4f3SGreg Roach $router->get('footers', '/footers', 'Admin\ModuleController::listFooters'); 2672279b4f3SGreg Roach $router->post('footers-update', '/footers', 'Admin\ModuleController::updateFooters'); 2682279b4f3SGreg Roach $router->get('history', '/history', 'Admin\ModuleController::listHistory'); 2692279b4f3SGreg Roach $router->post('history-update', '/history', 'Admin\ModuleController::updateHistory'); 2702279b4f3SGreg Roach $router->get('menus', '/menus', 'Admin\ModuleController::listMenus'); 2712279b4f3SGreg Roach $router->post('menus-update', '/menus', 'Admin\ModuleController::updateMenus'); 2722279b4f3SGreg Roach $router->get('languages', '/languages', 'Admin\ModuleController::listLanguages'); 2732279b4f3SGreg Roach $router->post('languages-update', '/languages', 'Admin\ModuleController::updateLanguages'); 2742279b4f3SGreg Roach $router->get('reports', '/reports', 'Admin\ModuleController::listReports'); 2752279b4f3SGreg Roach $router->post('reports-update', '/reports', 'Admin\ModuleController::updateReports'); 2762279b4f3SGreg Roach $router->get('sidebars', '/sidebars', 'Admin\ModuleController::listSidebars'); 2772279b4f3SGreg Roach $router->post('sidebars-update', '/sidebars', 'Admin\ModuleController::updateSidebars'); 2782279b4f3SGreg Roach $router->get('themes', '/themes', 'Admin\ModuleController::listThemes'); 2792279b4f3SGreg Roach $router->post('themes-update', '/themes', 'Admin\ModuleController::updateThemes'); 2802279b4f3SGreg Roach $router->get('tabs', '/tabs', 'Admin\ModuleController::listTabs'); 2812279b4f3SGreg Roach $router->post('tabs-update', '/tabs', 'Admin\ModuleController::updateTabs'); 2822474349cSGreg Roach $router->get(UsersCleanupPage::class, '/users-cleanup', UsersCleanupPage::class); 2832474349cSGreg Roach $router->post(UsersCleanupAction::class, '/users-cleanup', UsersCleanupAction::class); 2842279b4f3SGreg Roach $router->post('delete-module-settings', '/delete-module-settings', 'Admin\ModuleController::deleteModuleSettings'); 2852279b4f3SGreg Roach $router->get('map-data', '/map-data', 'Admin\LocationController::mapData'); 2862279b4f3SGreg Roach $router->get('map-data-edit', '/map-data-edit', 'Admin\LocationController::mapDataEdit'); 2872279b4f3SGreg Roach $router->post('map-data-update', '/map-data-edit', 'Admin\LocationController::mapDataSave'); 2882279b4f3SGreg Roach $router->post('map-data-delete', '/map-data-delete', 'Admin\LocationController::mapDataDelete'); 2892279b4f3SGreg Roach $router->get('locations-export', '/locations-export', 'Admin\LocationController::exportLocations'); 2902279b4f3SGreg Roach $router->get('locations-import', '/locations-import', 'Admin\LocationController::importLocations'); 2912279b4f3SGreg Roach $router->post('locations-import-action', '/locations-import', 'Admin\LocationController::importLocationsAction'); 2922279b4f3SGreg Roach $router->post('locations-import-from-tree', '/locations-import-from-tree', 'Admin\LocationController::importLocationsFromTree'); 2932279b4f3SGreg Roach $router->get('map-provider', '/map-provider', 'Admin\MapProviderController::mapProviderEdit'); 2942279b4f3SGreg Roach $router->post('map-provider-action', '/map-provider', 'Admin\MapProviderController::mapProviderSave'); 2952279b4f3SGreg Roach $router->get('upgrade', '/upgrade', 'Admin\UpgradeController::wizard'); 296c06384d0SGreg Roach $router->post('upgrade-confirm', '/upgrade-confirm', 'Admin\UpgradeController::confirm'); 2972279b4f3SGreg Roach $router->post('upgrade-action', '/upgrade', 'Admin\UpgradeController::step'); 2982279b4f3SGreg Roach $router->get('admin-users', '/admin-users', 'Admin\UsersController::index'); 2992279b4f3SGreg Roach $router->get('admin-users-data', '/admin-users-data', 'Admin\UsersController::data'); 3002279b4f3SGreg Roach $router->get('admin-users-create', '/admin-users-create', 'Admin\UsersController::create'); 3012279b4f3SGreg Roach $router->post('admin-users-create-action', '/admin-users-create', 'Admin\UsersController::save'); 3022279b4f3SGreg Roach $router->get('admin-users-edit', '/admin-users-edit', 'Admin\UsersController::edit'); 3032279b4f3SGreg Roach $router->post('admin-users-update', '/admin-users-edit', 'Admin\UsersController::update'); 304c7aa856bSGreg Roach $router->get(SitePreferencesPage::class, '/site-preferences', SitePreferencesPage::class); 305c7aa856bSGreg Roach $router->post(SitePreferencesAction::class, '/site-preferences', SitePreferencesAction::class); 306c7aa856bSGreg Roach $router->get(SiteRegistrationPage::class, '/site-registration', SiteRegistrationPage::class); 307c7aa856bSGreg Roach $router->post(SiteRegistrationAction::class, '/site-registration', SiteRegistrationAction::class); 3088e0e1b25SGreg Roach $router->get(TreePageDefaultEdit::class, '/trees/default-blocks', TreePageDefaultEdit::class); 3098e0e1b25SGreg Roach $router->post(TreePageDefaultUpdate::class, '/trees/default-blocks', TreePageDefaultUpdate::class); 3102279b4f3SGreg Roach $router->get('admin-trees-merge', '/trees/merge', 'AdminTreesController::merge'); 3112279b4f3SGreg Roach $router->post('admin-trees-merge-action', '/trees/merge', 'AdminTreesController::mergeAction'); 3122279b4f3SGreg Roach $router->post('admin-trees-sync', '/trees/sync', 'AdminTreesController::synchronize'); 3132279b4f3SGreg Roach $router->get('unused-media-thumbnail', '/unused-media-thumbnail', 'MediaFileController::unusedMediaThumbnail'); 3142279b4f3SGreg Roach $router->post('delete-user', '/users/delete/{user_id}', DeleteUser::class); 3158e0e1b25SGreg Roach $router->get(UserPageDefaultEdit::class, '/user-page-default-edit', UserPageDefaultEdit::class); 3168e0e1b25SGreg Roach $router->post(UserPageDefaultUpdate::class, '/user-page-default-update', UserPageDefaultUpdate::class); 3172279b4f3SGreg Roach }); 3182279b4f3SGreg Roach 31957796b09SGreg Roach // Manager routes (multiple trees). 3202279b4f3SGreg Roach $router->attach('', '/admin', static function (Map $router) { 3212279b4f3SGreg Roach $router->extras([ 322901ade19SGreg Roach 'middleware' => [ 323901ade19SGreg Roach AuthManager::class, 324901ade19SGreg Roach ], 3252279b4f3SGreg Roach ]); 3262279b4f3SGreg Roach 32757796b09SGreg Roach $router->get('manage-trees', '/trees/manage/{tree}', 'AdminTreesController::index'); 3282279b4f3SGreg Roach }); 3292279b4f3SGreg Roach 3302279b4f3SGreg Roach // Manager routes. 3312279b4f3SGreg Roach $router->attach('', '/tree/{tree}', static function (Map $router) { 3322279b4f3SGreg Roach $router->extras([ 333901ade19SGreg Roach 'middleware' => [ 334901ade19SGreg Roach AuthManager::class, 335901ade19SGreg Roach ], 3362279b4f3SGreg Roach ]); 3372279b4f3SGreg Roach 3382279b4f3SGreg Roach $router->get(PendingChangesLogPage::class, '/changes-log', PendingChangesLogPage::class); 3392279b4f3SGreg Roach $router->post(PendingChangesLogAction::class, '/changes-log', PendingChangesLogAction::class); 3402279b4f3SGreg Roach $router->get(PendingChangesLogData::class, '/changes-data', PendingChangesLogData::class); 3412279b4f3SGreg Roach $router->post(PendingChangesLogDelete::class, '/changes-delete', PendingChangesLogDelete::class); 3422279b4f3SGreg Roach $router->get(PendingChangesLogDownload::class, '/changes-download', PendingChangesLogDownload::class); 3432279b4f3SGreg Roach $router->get('admin-trees-check', '/check', 'AdminTreesController::check'); 3440d816e00SGreg Roach $router->get(DataFixChoose::class, '/data-fix', DataFixChoose::class); 3450d816e00SGreg Roach $router->post(DataFixSelect::class, '/data-fix', DataFixSelect::class); 3460d816e00SGreg Roach $router->get(DataFixPage::class, '/data-fix/{data_fix}', DataFixPage::class); 3470d816e00SGreg Roach $router->post(DataFixUpdate::class, '/data-fix/{data_fix}/update', DataFixUpdate::class); 3480d816e00SGreg Roach $router->post(DataFixUpdateAll::class, '/data-fix/{data_fix}/update-all', DataFixUpdateAll::class); 3490d816e00SGreg Roach $router->get(DataFixData::class, '/data-fix/{data_fix}/data', DataFixData::class); 3500d816e00SGreg Roach $router->get(DataFixPreview::class, '/data-fix/{data_fix}/preview', DataFixPreview::class); 3512279b4f3SGreg Roach $router->get('admin-trees-duplicates', '/duplicates', 'AdminTreesController::duplicates'); 3526d576906SGreg Roach $router->get(ExportGedcomPage::class, '/export', ExportGedcomPage::class); 3536d576906SGreg Roach $router->post(ExportGedcomClient::class, '/export-client', ExportGedcomClient::class); 3546d576906SGreg Roach $router->post(ExportGedcomServer::class, '/export-server', ExportGedcomServer::class); 3552279b4f3SGreg Roach $router->get('admin-trees-import', '/import', 'AdminTreesController::importForm'); 3562279b4f3SGreg Roach $router->post('admin-trees-import-action', '/import', 'AdminTreesController::importAction'); 3575bbfbb82SGreg Roach $router->get(MergeRecordsPage::class, '/merge-step1', MergeRecordsPage::class); 3585bbfbb82SGreg Roach $router->post(MergeRecordsAction::class, '/merge-step1', MergeRecordsAction::class); 3595bbfbb82SGreg Roach $router->get(MergeFactsPage::class, '/merge-step2', MergeFactsPage::class); 3605bbfbb82SGreg Roach $router->post(MergeFactsAction::class, '/merge-step2', MergeFactsAction::class); 3612279b4f3SGreg Roach $router->get('admin-trees-preferences', '/preferences', 'AdminTreesController::preferences'); 3622279b4f3SGreg Roach $router->post('admin-trees-preferences-update', '/preferences', 'AdminTreesController::preferencesUpdate'); 3632279b4f3SGreg Roach $router->get('admin-trees-renumber', '/renumber', 'AdminTreesController::renumber'); 3642279b4f3SGreg Roach $router->post('admin-trees-renumber-action', '/renumber', 'AdminTreesController::renumberAction'); 3658e0e1b25SGreg Roach $router->get(TreePageEdit::class, '/tree-page-edit', TreePageEdit::class); 3662279b4f3SGreg Roach $router->post('import', '/load', 'GedcomFileController::import'); 3678e0e1b25SGreg Roach $router->post(TreePageUpdate::class, '/tree-page-update', TreePageUpdate::class); 3688e0e1b25SGreg Roach $router->get(TreePageBlockEdit::class, '/tree-page-block-edit', TreePageBlockEdit::class); 3698e0e1b25SGreg Roach $router->post(TreePageBlockUpdate::class, '/tree-page-block-edit', TreePageBlockUpdate::class); 3702279b4f3SGreg Roach $router->get('tree-preferences', '/preferences', 'AdminController::treePreferencesEdit'); 3712279b4f3SGreg Roach $router->post('tree-preferences-update', '/preferences', 'AdminController::treePreferencesUpdate'); 3722279b4f3SGreg Roach $router->get('tree-privacy', '/privacy', 'AdminController::treePrivacyEdit'); 3732279b4f3SGreg Roach $router->post('tree-privacy-update', '/privacy', 'AdminController::treePrivacyUpdate'); 37496716c47SGreg Roach $router->get(UnconnectedPage::class, '/unconnected', UnconnectedPage::class); 37596716c47SGreg Roach $router->post(UnconnectedAction::class, '/unconnected', UnconnectedAction::class); 3762279b4f3SGreg Roach }); 3772279b4f3SGreg Roach 3782279b4f3SGreg Roach // Moderator routes. 3792279b4f3SGreg Roach $router->attach('', '/tree/{tree}', static function (Map $router) { 3802279b4f3SGreg Roach $router->extras([ 381901ade19SGreg Roach 'middleware' => [ 382901ade19SGreg Roach AuthModerator::class, 383901ade19SGreg Roach ], 3842279b4f3SGreg Roach ]); 3852279b4f3SGreg Roach $router->post(PendingChangesAcceptTree::class, '/accept', PendingChangesAcceptTree::class); 3862279b4f3SGreg Roach $router->post(PendingChangesAcceptRecord::class, '/accept/{xref}', PendingChangesAcceptRecord::class); 3872279b4f3SGreg Roach $router->post(PendingChangesAcceptChange::class, '/accept/{xref}/{change}', PendingChangesAcceptChange::class); 3882279b4f3SGreg Roach $router->get(PendingChanges::class, '/pending', PendingChanges::class); 3892279b4f3SGreg Roach $router->post(PendingChangesRejectTree::class, '/reject', PendingChangesRejectTree::class); 3902279b4f3SGreg Roach $router->post(PendingChangesRejectRecord::class, '/reject/{xref}', PendingChangesRejectRecord::class); 3912279b4f3SGreg Roach $router->post(PendingChangesRejectChange::class, '/reject/{xref}/{change}', PendingChangesRejectChange::class); 3922279b4f3SGreg Roach }); 3932279b4f3SGreg Roach 3942279b4f3SGreg Roach // Editor routes. 3952279b4f3SGreg Roach $router->attach('', '/tree/{tree}', static function (Map $router) { 3962279b4f3SGreg Roach $router->extras([ 397901ade19SGreg Roach 'middleware' => [ 398901ade19SGreg Roach AuthEditor::class, 399901ade19SGreg Roach ], 4002279b4f3SGreg Roach ]); 4012279b4f3SGreg Roach 4027c7d1e03SGreg Roach $router->get(AddChildToFamilyPage::class, '/add-child-to-family', AddChildToFamilyPage::class); 4037c7d1e03SGreg Roach $router->post(AddChildToFamilyAction::class, '/add-child-to-family', AddChildToFamilyAction::class); 4042279b4f3SGreg Roach $router->get(AddNewFact::class, '/add-fact/{xref}/{fact}', AddNewFact::class); 4052279b4f3SGreg Roach $router->post(SelectNewFact::class, '/add-fact/{xref}', SelectNewFact::class); 4062279b4f3SGreg Roach $router->get('add-media-file', '/add-media-file', 'EditMediaController::addMediaFile'); 4072279b4f3SGreg Roach $router->post('add-media-file-update', '/add-media-file', 'EditMediaController::addMediaFileAction'); 4087c7d1e03SGreg Roach $router->get(AddName::class, '/add-name', AddName::class); 4097c7d1e03SGreg Roach $router->get(AddSpouseToFamilyPage::class, '/add-spouse-to-family', AddSpouseToFamilyPage::class); 4107c7d1e03SGreg Roach $router->post(AddSpouseToFamilyAction::class, '/add-spouse-to-family', AddSpouseToFamilyAction::class); 41143322877SGreg Roach $router->get(ChangeFamilyMembersPage::class, '/change-family-members', ChangeFamilyMembersPage::class); 41243322877SGreg Roach $router->post(ChangeFamilyMembersAction::class, '/change-family-members', ChangeFamilyMembersAction::class); 4132279b4f3SGreg Roach $router->get(CreateMediaObjectModal::class, '/create-media-object', CreateMediaObjectModal::class); 4142279b4f3SGreg Roach $router->post(CreateMediaObjectAction::class, '/create-media-object', CreateMediaObjectAction::class); 4152279b4f3SGreg Roach $router->post('create-media-from-file', '/create-media-from-file', 'EditMediaController::createMediaObjectFromFileAction'); 4162279b4f3SGreg Roach $router->post(CopyFact::class, '/copy/{xref}/{fact_id}', CopyFact::class); 4172279b4f3SGreg Roach $router->get(CreateNoteModal::class, '/create-note-object', CreateNoteModal::class); 4182279b4f3SGreg Roach $router->post(CreateNoteAction::class, '/create-note-object', CreateNoteAction::class); 4192279b4f3SGreg Roach $router->get(CreateRepositoryModal::class, '/create-repository', CreateRepositoryModal::class); 4202279b4f3SGreg Roach $router->post(CreateRepositoryAction::class, '/create-repository', CreateRepositoryAction::class); 4212279b4f3SGreg Roach $router->get(CreateSourceModal::class, '/create-source', CreateSourceModal::class); 4222279b4f3SGreg Roach $router->post(CreateSourceAction::class, '/create-source', CreateSourceAction::class); 4232279b4f3SGreg Roach $router->get(CreateSubmitterModal::class, '/create-submitter', CreateSubmitterModal::class); 4242279b4f3SGreg Roach $router->post(CreateSubmitterAction::class, '/create-submitter', CreateSubmitterAction::class); 4252279b4f3SGreg Roach $router->post(DeleteRecord::class, '/delete/{xref}', DeleteRecord::class); 4262279b4f3SGreg Roach $router->post(DeleteFact::class, '/delete/{xref}/{fact_id}', DeleteFact::class); 427*fb2382c0SGreg Roach $router->get(EditFactPage::class, '/edit-fact/{xref}/{fact_id}', EditFactPage::class); 428*fb2382c0SGreg Roach $router->post(EditFactAction::class, '/update-fact/{xref}{/fact_id}', EditFactAction::class); 4292279b4f3SGreg Roach $router->get('edit-media-file', '/edit-media-file', 'EditMediaController::editMediaFile'); 4302279b4f3SGreg Roach $router->post('edit-media-file-update', '/edit-media-file', 'EditMediaController::editMediaFileAction'); 431316db80eSGreg Roach $router->get('edit-note-object', '/edit-note-object/{xref}', 'EditNoteController::editNoteObject'); 432316db80eSGreg Roach $router->post('edit-note-object-action', '/edit-note-object/{xref}', 'EditNoteController::updateNoteObject'); 4332279b4f3SGreg Roach $router->get(EditRawFactPage::class, '/edit-raw/{xref}/{fact_id}', EditRawFactPage::class); 4342279b4f3SGreg Roach $router->post(EditRawFactAction::class, '/edit-raw/{xref}/{fact_id}', EditRawFactAction::class); 4352279b4f3SGreg Roach $router->get(EditRawRecordPage::class, '/edit-raw/{xref}', EditRawRecordPage::class); 4362279b4f3SGreg Roach $router->post(EditRawRecordAction::class, '/edit-raw/{xref}', EditRawRecordAction::class); 4372279b4f3SGreg Roach $router->get('link-media-to-individual', '/link-media-to-individual', 'EditMediaController::linkMediaToIndividual'); 4382279b4f3SGreg Roach $router->get('link-media-to-family', '/link-media-to-family', 'EditMediaController::linkMediaToFamily'); 4392279b4f3SGreg Roach $router->get('link-media-to-source', '/link-media-to-source', 'EditMediaController::linkMediaToSource'); 440814c6707SGreg Roach $router->post('link-media-to-record', '/link-media-to-record/{xref}', 'EditMediaController::linkMediaToRecordAction'); 4412279b4f3SGreg Roach $router->post(PasteFact::class, '/paste-fact/{xref}', PasteFact::class); 4422279b4f3SGreg Roach $router->get(ReorderChildrenPage::class, '/reorder-children/{xref}', ReorderChildrenPage::class); 4432279b4f3SGreg Roach $router->post(ReorderChildrenAction::class, '/reorder-children/{xref}', ReorderChildrenAction::class); 4442279b4f3SGreg Roach $router->get(ReorderMediaPage::class, '/reorder-media/{xref}', ReorderMediaPage::class); 4452279b4f3SGreg Roach $router->post(ReorderMediaAction::class, '/reorder-media/{xref}', ReorderMediaAction::class); 4462279b4f3SGreg Roach $router->get(ReorderNamesPage::class, '/reorder-names/{xref}', ReorderNamesPage::class); 4472279b4f3SGreg Roach $router->post(ReorderNamesAction::class, '/reorder-names/{xref}', ReorderNamesAction::class); 4481afbbc50SGreg Roach $router->get(ReorderFamiliesPage::class, '/reorder-spouses/{xref}', ReorderFamiliesPage::class); 4491afbbc50SGreg Roach $router->post(ReorderFamiliesAction::class, '/reorder-spouses/{xref}', ReorderFamiliesAction::class); 4502279b4f3SGreg Roach $router->get(SearchReplacePage::class, '/search-replace', SearchReplacePage::class); 4512279b4f3SGreg Roach $router->post(SearchReplaceAction::class, '/search-replace', SearchReplaceAction::class); 4527c7d1e03SGreg Roach $router->get(AddChildToIndividualPage::class, '/add-child-to-individual', AddChildToIndividualPage::class); 4537c7d1e03SGreg Roach $router->post(AddChildToIndividualAction::class, '/add-child-to-individual', AddChildToIndividualAction::class); 4547c7d1e03SGreg Roach $router->get(AddParentToIndividualPage::class, '/add-parent-to-individual', AddParentToIndividualPage::class); 4557c7d1e03SGreg Roach $router->post(AddParentToIndividualAction::class, '/add-parent-to-individual', AddParentToIndividualAction::class); 4567c7d1e03SGreg Roach $router->get(AddSpouseToIndividualPage::class, '/add-spouse-to-individual', AddSpouseToIndividualPage::class); 4577c7d1e03SGreg Roach $router->post(AddSpouseToIndividualAction::class, '/add-spouse-to-individual', AddSpouseToIndividualAction::class); 4587c7d1e03SGreg Roach $router->get(AddUnlinkedPage::class, '/add-unlinked-individual', AddUnlinkedPage::class); 4597c7d1e03SGreg Roach $router->post(AddUnlinkedAction::class, '/add-unlinked-individual', AddUnlinkedAction::class); 4607c7d1e03SGreg Roach $router->get(LinkChildToFamilyPage::class, '/link-child-to-family', LinkChildToFamilyPage::class); 4617c7d1e03SGreg Roach $router->post(LinkChildToFamilyAction::class, '/link-child-to-family', LinkChildToFamilyAction::class); 4627c7d1e03SGreg Roach $router->get(LinkSpouseToIndividualPage::class, '/link-spouse-to-individual', LinkSpouseToIndividualPage::class); 4637c7d1e03SGreg Roach $router->post(LinkSpouseToIndividualAction::class, '/link-spouse-to-individual', LinkSpouseToIndividualAction::class); 4647c7d1e03SGreg Roach $router->get(EditName::class, '/edit-name/{xref}/{fact_id}', EditName::class); 4652279b4f3SGreg Roach }); 4662279b4f3SGreg Roach 4672279b4f3SGreg Roach // Member routes. 4682279b4f3SGreg Roach $router->attach('', '/tree/{tree}', static function (Map $router) { 4692279b4f3SGreg Roach $router->extras([ 470901ade19SGreg Roach 'middleware' => [ 471901ade19SGreg Roach AuthMember::class, 472901ade19SGreg Roach ], 4732279b4f3SGreg Roach ]); 4742279b4f3SGreg Roach 475df77d633SGreg Roach $router->post(MessageSelect::class, '/message-select', MessageSelect::class); 476df77d633SGreg Roach $router->get(MessagePage::class, '/message-compose', MessagePage::class); 477df77d633SGreg Roach $router->post(MessageAction::class, '/message-send', MessageAction::class); 4788e0e1b25SGreg Roach $router->get(UserPage::class, '/my-page', UserPage::class); 4798e0e1b25SGreg Roach $router->get(UserPageBlock::class, '/my-page-block', UserPageBlock::class); 4808e0e1b25SGreg Roach $router->get(UserPageEdit::class, '/my-page-edit', UserPageEdit::class); 4818e0e1b25SGreg Roach $router->post(UserPageUpdate::class, '/my-page-edit', UserPageUpdate::class); 4828e0e1b25SGreg Roach $router->get(UserPageBlockEdit::class, '/my-page-block-edit', UserPageBlockEdit::class); 4838e0e1b25SGreg Roach $router->post(UserPageBlockUpdate::class, '/my-page-block-edit', UserPageBlockUpdate::class); 4842279b4f3SGreg Roach }); 4852279b4f3SGreg Roach 4862279b4f3SGreg Roach // User routes. 4872279b4f3SGreg Roach $router->attach('', '', static function (Map $router) { 4882279b4f3SGreg Roach $router->extras([ 489901ade19SGreg Roach 'middleware' => [ 490901ade19SGreg Roach AuthLoggedIn::class, 491901ade19SGreg Roach ], 4922279b4f3SGreg Roach ]); 4932279b4f3SGreg Roach 4942279b4f3SGreg Roach $router->get(AccountEdit::class, '/my-account{/tree}', AccountEdit::class); 4952279b4f3SGreg Roach $router->post(AccountUpdate::class, '/my-account{/tree}', AccountUpdate::class); 4962279b4f3SGreg Roach $router->post(AccountDelete::class, '/my-account-delete', AccountDelete::class); 4972279b4f3SGreg Roach }); 4982279b4f3SGreg Roach 499f917a287SGreg Roach // Visitor routes - with an optional tree (for sites with no public trees). 5002279b4f3SGreg Roach $router->attach('', '', static function (Map $router) { 501f917a287SGreg Roach $router->get(LoginPage::class, '/login{/tree}', LoginPage::class); 502f917a287SGreg Roach $router->post(LoginAction::class, '/login{/tree}', LoginAction::class); 503f917a287SGreg Roach $router->get(PasswordRequestPage::class, '/password-request{/tree}', PasswordRequestPage::class); 504f917a287SGreg Roach $router->post(PasswordRequestAction::class, '/password-request{/tree}', PasswordRequestAction::class); 5059fa6ab69SGreg Roach $router->get(RegisterPage::class, '/register{/tree}', RegisterPage::class); 5069fa6ab69SGreg Roach $router->post(RegisterAction::class, '/register{/tree}', RegisterAction::class); 507f917a287SGreg Roach $router->get(PasswordResetPage::class, '/password-reset/{token}{/tree}', PasswordResetPage::class); 508f917a287SGreg Roach $router->post(PasswordResetAction::class, '/password-reset/{token}{/tree}', PasswordResetAction::class); 509f917a287SGreg Roach $router->get(VerifyEmail::class, '/verify/{username}/{token}{/tree}', VerifyEmail::class); 5102279b4f3SGreg Roach }); 5112279b4f3SGreg Roach 512b45ccc4fSGreg Roach // Visitor routes with a tree. 5132279b4f3SGreg Roach $router->attach('', '/tree/{tree}', static function (Map $router) { 5148e0e1b25SGreg Roach $router->get(TreePage::class, '', TreePage::class); 5152279b4f3SGreg Roach $router->get('autocomplete-folder', '/autocomplete-folder', 'AutocompleteController::folder'); 5162279b4f3SGreg Roach $router->get('autocomplete-page', '/autocomplete-page', 'AutocompleteController::page'); 5172279b4f3SGreg Roach $router->get('autocomplete-place', '/autocomplete-place', 'AutocompleteController::place'); 5182279b4f3SGreg Roach $router->get('calendar', '/calendar/{view}', 'CalendarController::page'); 5192839b8ceSGreg Roach $router->post('calendar-select', '/calendar/{view}', 'CalendarController::select'); 5202279b4f3SGreg Roach $router->get('calendar-events', '/calendar-events/{view}', 'CalendarController::calendar'); 521e381f98dSGreg Roach $router->get(ContactPage::class, '/contact', ContactPage::class); 522e381f98dSGreg Roach $router->post(ContactAction::class, '/contact', ContactAction::class); 5232279b4f3SGreg Roach $router->get(FamilyPage::class, '/family/{xref}{/slug}', FamilyPage::class); 5241635452cSGreg Roach $router->get(HeaderPage::class, '/header/{xref}{/slug}', HeaderPage::class); 5252279b4f3SGreg Roach $router->get(IndividualPage::class, '/individual/{xref}{/slug}', IndividualPage::class); 5262279b4f3SGreg Roach $router->get('media-thumbnail', '/media-thumbnail', 'MediaFileController::mediaThumbnail'); 5272279b4f3SGreg Roach $router->get('media-download', '/media-download', 'MediaFileController::mediaDownload'); 5282279b4f3SGreg Roach $router->get(MediaPage::class, '/media/{xref}{/slug}', MediaPage::class); 5292279b4f3SGreg Roach $router->get(NotePage::class, '/note/{xref}{/slug}', NotePage::class); 5302279b4f3SGreg Roach $router->get(GedcomRecordPage::class, '/record/{xref}{/slug}', GedcomRecordPage::class); 5312279b4f3SGreg Roach $router->get(RepositoryPage::class, '/repository/{xref}{/slug}', RepositoryPage::class); 5322279b4f3SGreg Roach $router->get(ReportListPage::class, '/report', ReportListPage::class); 5332279b4f3SGreg Roach $router->post(ReportListAction::class, '/report', ReportListAction::class); 5342279b4f3SGreg Roach $router->get(ReportSetupPage::class, '/report/{report}', ReportSetupPage::class); 5352279b4f3SGreg Roach $router->post(ReportSetupAction::class, '/report/{report}', ReportSetupAction::class); 5362279b4f3SGreg Roach $router->get(ReportGenerate::class, '/report-run/{report}', ReportGenerate::class); 5372279b4f3SGreg Roach $router->get(SearchAdvancedPage::class, '/search-advanced', SearchAdvancedPage::class); 5382279b4f3SGreg Roach $router->post(SearchAdvancedAction::class, '/search-advanced', SearchAdvancedAction::class); 5392279b4f3SGreg Roach $router->get(SearchGeneralPage::class, '/search-general', SearchGeneralPage::class); 5402279b4f3SGreg Roach $router->post(SearchGeneralAction::class, '/search-general', SearchGeneralAction::class); 5412279b4f3SGreg Roach $router->get(SearchPhoneticPage::class, '/search-phonetic', SearchPhoneticPage::class); 5422279b4f3SGreg Roach $router->post(SearchPhoneticAction::class, '/search-phonetic', SearchPhoneticAction::class); 5432279b4f3SGreg Roach $router->post(SearchQuickAction::class, '/search-quick', SearchQuickAction::class); 5442279b4f3SGreg Roach $router->post(Select2Family::class, '/select2-family', Select2Family::class); 5452279b4f3SGreg Roach $router->post(Select2Individual::class, '/select2-individual', Select2Individual::class); 5462279b4f3SGreg Roach $router->post(Select2MediaObject::class, '/select2-media', Select2MediaObject::class); 5472279b4f3SGreg Roach $router->post(Select2Note::class, '/select2-note', Select2Note::class); 548a60f9d1cSGreg Roach $router->post(Select2Place::class, '/select2-place', Select2Place::class); 5492279b4f3SGreg Roach $router->post(Select2Source::class, '/select2-source', Select2Source::class); 5502279b4f3SGreg Roach $router->post(Select2Submitter::class, '/select2-submitter', Select2Submitter::class); 5512279b4f3SGreg Roach $router->post(Select2Repository::class, '/select2-repository', Select2Repository::class); 5522279b4f3SGreg Roach $router->get(SourcePage::class, '/source/{xref}{/slug}', SourcePage::class); 5531635452cSGreg Roach $router->get(SubmissionPage::class, '/submission/{xref}{/slug}', SubmissionPage::class); 554ffc0a61fSGreg Roach $router->get(SubmitterPage::class, '/submitter/{xref}{/slug}', SubmitterPage::class); 5558e0e1b25SGreg Roach $router->get(TreePageBlock::class, '/tree-page-block', TreePageBlock::class); 5562279b4f3SGreg Roach $router->get('example', '/…'); 5572279b4f3SGreg Roach }); 5582279b4f3SGreg Roach 559b59ec43dSGreg Roach // Match module routes, with and without a tree. 560b59ec43dSGreg Roach $router->get('module-tree', '/module/{module}/{action}/{tree}', ModuleAction::class) 5612279b4f3SGreg Roach ->allows(RequestMethodInterface::METHOD_POST); 562b59ec43dSGreg Roach $router->get('module-no-tree', '/module/{module}/{action}', ModuleAction::class) 563b59ec43dSGreg Roach ->allows(RequestMethodInterface::METHOD_POST); 564b59ec43dSGreg Roach // Generate module routes only. The router cannot distinguish a private tree from no tree. 565b59ec43dSGreg Roach $router->get('module', '/module/{module}/{action}{/tree}', null); 5662279b4f3SGreg Roach 5672279b4f3SGreg Roach $router->get(HelpText::class, '/help/{topic}', HelpText::class); 5682279b4f3SGreg Roach $router->post(SelectLanguage::class, '/language/{language}', SelectLanguage::class); 5692279b4f3SGreg Roach $router->post(Logout::class, '/logout', Logout::class); 5702279b4f3SGreg Roach $router->get(Ping::class, '/ping', Ping::class); 5712279b4f3SGreg Roach $router->get(RobotsTxt::class, '/robots.txt', RobotsTxt::class); 5722279b4f3SGreg Roach $router->post(SelectTheme::class, '/theme/{theme}', SelectTheme::class); 5732279b4f3SGreg Roach $router->get(HomePage::class, '/', HomePage::class); 5742279b4f3SGreg Roach 57546431a62SGreg Roach // Some URL rewrite configurations will pass everything not in /public to index.php 57646431a62SGreg Roach $router->get(AppleTouchIconPng::class, '/apple-touch-icon.png', AppleTouchIconPng::class); 57746431a62SGreg Roach $router->get(FaviconIco::class, '/favicon.ico', FaviconIco::class); 578901ade19SGreg Roach }); 5792279b4f3SGreg Roach } 5802279b4f3SGreg Roach} 581