xref: /webtrees/app/Http/Routes/WebRoutes.php (revision 89f7189b61a494347591c99bdb92afb7d8b66e1b)
1<?php
2
3/**
4 * webtrees: online genealogy
5 * Copyright (C) 2021 webtrees development team
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18declare(strict_types=1);
19
20namespace Fisharebest\Webtrees\Http\Routes;
21
22use Aura\Router\Map;
23use Fig\Http\Message\RequestMethodInterface;
24use Fisharebest\Webtrees\Http\Middleware\AuthAdministrator;
25use Fisharebest\Webtrees\Http\Middleware\AuthEditor;
26use Fisharebest\Webtrees\Http\Middleware\AuthLoggedIn;
27use Fisharebest\Webtrees\Http\Middleware\AuthManager;
28use Fisharebest\Webtrees\Http\Middleware\AuthModerator;
29use Fisharebest\Webtrees\Http\RequestHandlers\AccountDelete;
30use Fisharebest\Webtrees\Http\RequestHandlers\AccountEdit;
31use Fisharebest\Webtrees\Http\RequestHandlers\AccountUpdate;
32use Fisharebest\Webtrees\Http\RequestHandlers\AddChildToFamilyAction;
33use Fisharebest\Webtrees\Http\RequestHandlers\AddChildToFamilyPage;
34use Fisharebest\Webtrees\Http\RequestHandlers\AddChildToIndividualAction;
35use Fisharebest\Webtrees\Http\RequestHandlers\AddChildToIndividualPage;
36use Fisharebest\Webtrees\Http\RequestHandlers\AddMediaFileAction;
37use Fisharebest\Webtrees\Http\RequestHandlers\AddMediaFileModal;
38use Fisharebest\Webtrees\Http\RequestHandlers\AddName;
39use Fisharebest\Webtrees\Http\RequestHandlers\AddNewFact;
40use Fisharebest\Webtrees\Http\RequestHandlers\AddParentToIndividualAction;
41use Fisharebest\Webtrees\Http\RequestHandlers\AddParentToIndividualPage;
42use Fisharebest\Webtrees\Http\RequestHandlers\AddSpouseToFamilyAction;
43use Fisharebest\Webtrees\Http\RequestHandlers\AddSpouseToFamilyPage;
44use Fisharebest\Webtrees\Http\RequestHandlers\AddSpouseToIndividualAction;
45use Fisharebest\Webtrees\Http\RequestHandlers\AddSpouseToIndividualPage;
46use Fisharebest\Webtrees\Http\RequestHandlers\AddUnlinkedAction;
47use Fisharebest\Webtrees\Http\RequestHandlers\AddUnlinkedPage;
48use Fisharebest\Webtrees\Http\RequestHandlers\AdminMediaFileDownload;
49use Fisharebest\Webtrees\Http\RequestHandlers\AdminMediaFileThumbnail;
50use Fisharebest\Webtrees\Http\RequestHandlers\AppleTouchIconPng;
51use Fisharebest\Webtrees\Http\RequestHandlers\AutoCompleteCitation;
52use Fisharebest\Webtrees\Http\RequestHandlers\AutoCompleteFolder;
53use Fisharebest\Webtrees\Http\RequestHandlers\AutoCompletePlace;
54use Fisharebest\Webtrees\Http\RequestHandlers\AutoCompleteSurname;
55use Fisharebest\Webtrees\Http\RequestHandlers\BroadcastAction;
56use Fisharebest\Webtrees\Http\RequestHandlers\BroadcastPage;
57use Fisharebest\Webtrees\Http\RequestHandlers\CalendarAction;
58use Fisharebest\Webtrees\Http\RequestHandlers\CalendarEvents;
59use Fisharebest\Webtrees\Http\RequestHandlers\CalendarPage;
60use Fisharebest\Webtrees\Http\RequestHandlers\ChangeFamilyMembersAction;
61use Fisharebest\Webtrees\Http\RequestHandlers\ChangeFamilyMembersPage;
62use Fisharebest\Webtrees\Http\RequestHandlers\CheckTree;
63use Fisharebest\Webtrees\Http\RequestHandlers\CleanDataFolder;
64use Fisharebest\Webtrees\Http\RequestHandlers\ContactAction;
65use Fisharebest\Webtrees\Http\RequestHandlers\ContactPage;
66use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
67use Fisharebest\Webtrees\Http\RequestHandlers\CopyFact;
68use Fisharebest\Webtrees\Http\RequestHandlers\CreateMediaObjectAction;
69use Fisharebest\Webtrees\Http\RequestHandlers\CreateMediaObjectFromFile;
70use Fisharebest\Webtrees\Http\RequestHandlers\CreateMediaObjectModal;
71use Fisharebest\Webtrees\Http\RequestHandlers\CreateNoteAction;
72use Fisharebest\Webtrees\Http\RequestHandlers\CreateNoteModal;
73use Fisharebest\Webtrees\Http\RequestHandlers\CreateRepositoryAction;
74use Fisharebest\Webtrees\Http\RequestHandlers\CreateRepositoryModal;
75use Fisharebest\Webtrees\Http\RequestHandlers\CreateSourceAction;
76use Fisharebest\Webtrees\Http\RequestHandlers\CreateSourceModal;
77use Fisharebest\Webtrees\Http\RequestHandlers\CreateSubmitterAction;
78use Fisharebest\Webtrees\Http\RequestHandlers\CreateSubmitterModal;
79use Fisharebest\Webtrees\Http\RequestHandlers\CreateTreeAction;
80use Fisharebest\Webtrees\Http\RequestHandlers\CreateTreePage;
81use Fisharebest\Webtrees\Http\RequestHandlers\DataFixChoose;
82use Fisharebest\Webtrees\Http\RequestHandlers\DataFixData;
83use Fisharebest\Webtrees\Http\RequestHandlers\DataFixPage;
84use Fisharebest\Webtrees\Http\RequestHandlers\DataFixPreview;
85use Fisharebest\Webtrees\Http\RequestHandlers\DataFixSelect;
86use Fisharebest\Webtrees\Http\RequestHandlers\DataFixUpdate;
87use Fisharebest\Webtrees\Http\RequestHandlers\DataFixUpdateAll;
88use Fisharebest\Webtrees\Http\RequestHandlers\DeleteFact;
89use Fisharebest\Webtrees\Http\RequestHandlers\DeletePath;
90use Fisharebest\Webtrees\Http\RequestHandlers\DeleteRecord;
91use Fisharebest\Webtrees\Http\RequestHandlers\DeleteTreeAction;
92use Fisharebest\Webtrees\Http\RequestHandlers\DeleteUser;
93use Fisharebest\Webtrees\Http\RequestHandlers\EditFactAction;
94use Fisharebest\Webtrees\Http\RequestHandlers\EditFactPage;
95use Fisharebest\Webtrees\Http\RequestHandlers\EditMediaFileAction;
96use Fisharebest\Webtrees\Http\RequestHandlers\EditMediaFileModal;
97use Fisharebest\Webtrees\Http\RequestHandlers\EditName;
98use Fisharebest\Webtrees\Http\RequestHandlers\EditNoteAction;
99use Fisharebest\Webtrees\Http\RequestHandlers\EditNotePage;
100use Fisharebest\Webtrees\Http\RequestHandlers\EditRawFactAction;
101use Fisharebest\Webtrees\Http\RequestHandlers\EditRawFactPage;
102use Fisharebest\Webtrees\Http\RequestHandlers\EditRawRecordAction;
103use Fisharebest\Webtrees\Http\RequestHandlers\EditRawRecordPage;
104use Fisharebest\Webtrees\Http\RequestHandlers\EmailPreferencesAction;
105use Fisharebest\Webtrees\Http\RequestHandlers\EmailPreferencesPage;
106use Fisharebest\Webtrees\Http\RequestHandlers\ExportGedcomClient;
107use Fisharebest\Webtrees\Http\RequestHandlers\ExportGedcomPage;
108use Fisharebest\Webtrees\Http\RequestHandlers\ExportGedcomServer;
109use Fisharebest\Webtrees\Http\RequestHandlers\FamilyPage;
110use Fisharebest\Webtrees\Http\RequestHandlers\FaviconIco;
111use Fisharebest\Webtrees\Http\RequestHandlers\FindDuplicateRecords;
112use Fisharebest\Webtrees\Http\RequestHandlers\GedcomLoad;
113use Fisharebest\Webtrees\Http\RequestHandlers\GedcomRecordPage;
114use Fisharebest\Webtrees\Http\RequestHandlers\HeaderPage;
115use Fisharebest\Webtrees\Http\RequestHandlers\HelpText;
116use Fisharebest\Webtrees\Http\RequestHandlers\HomePage;
117use Fisharebest\Webtrees\Http\RequestHandlers\ImportGedcomAction;
118use Fisharebest\Webtrees\Http\RequestHandlers\ImportGedcomPage;
119use Fisharebest\Webtrees\Http\RequestHandlers\IndividualPage;
120use Fisharebest\Webtrees\Http\RequestHandlers\LinkChildToFamilyAction;
121use Fisharebest\Webtrees\Http\RequestHandlers\LinkChildToFamilyPage;
122use Fisharebest\Webtrees\Http\RequestHandlers\LinkMediaToFamilyModal;
123use Fisharebest\Webtrees\Http\RequestHandlers\LinkMediaToIndividualModal;
124use Fisharebest\Webtrees\Http\RequestHandlers\LinkMediaToRecordAction;
125use Fisharebest\Webtrees\Http\RequestHandlers\LinkMediaToSourceModal;
126use Fisharebest\Webtrees\Http\RequestHandlers\LinkSpouseToIndividualAction;
127use Fisharebest\Webtrees\Http\RequestHandlers\LinkSpouseToIndividualPage;
128use Fisharebest\Webtrees\Http\RequestHandlers\LoginAction;
129use Fisharebest\Webtrees\Http\RequestHandlers\LoginPage;
130use Fisharebest\Webtrees\Http\RequestHandlers\Logout;
131use Fisharebest\Webtrees\Http\RequestHandlers\ManageMediaAction;
132use Fisharebest\Webtrees\Http\RequestHandlers\ManageMediaData;
133use Fisharebest\Webtrees\Http\RequestHandlers\ManageMediaPage;
134use Fisharebest\Webtrees\Http\RequestHandlers\ManageTrees;
135use Fisharebest\Webtrees\Http\RequestHandlers\MapDataAdd;
136use Fisharebest\Webtrees\Http\RequestHandlers\MapDataDelete;
137use Fisharebest\Webtrees\Http\RequestHandlers\MapDataEdit;
138use Fisharebest\Webtrees\Http\RequestHandlers\MapDataExportCSV;
139use Fisharebest\Webtrees\Http\RequestHandlers\MapDataExportGeoJson;
140use Fisharebest\Webtrees\Http\RequestHandlers\MapDataImportAction;
141use Fisharebest\Webtrees\Http\RequestHandlers\MapDataImportPage;
142use Fisharebest\Webtrees\Http\RequestHandlers\MapDataList;
143use Fisharebest\Webtrees\Http\RequestHandlers\MapDataSave;
144use Fisharebest\Webtrees\Http\RequestHandlers\MapProviderAction;
145use Fisharebest\Webtrees\Http\RequestHandlers\MapProviderPage;
146use Fisharebest\Webtrees\Http\RequestHandlers\Masquerade;
147use Fisharebest\Webtrees\Http\RequestHandlers\MediaFileDownload;
148use Fisharebest\Webtrees\Http\RequestHandlers\MediaFileThumbnail;
149use Fisharebest\Webtrees\Http\RequestHandlers\MediaPage;
150use Fisharebest\Webtrees\Http\RequestHandlers\MergeFactsAction;
151use Fisharebest\Webtrees\Http\RequestHandlers\MergeFactsPage;
152use Fisharebest\Webtrees\Http\RequestHandlers\MergeRecordsAction;
153use Fisharebest\Webtrees\Http\RequestHandlers\MergeRecordsPage;
154use Fisharebest\Webtrees\Http\RequestHandlers\MergeTreesAction;
155use Fisharebest\Webtrees\Http\RequestHandlers\MergeTreesPage;
156use Fisharebest\Webtrees\Http\RequestHandlers\MessageAction;
157use Fisharebest\Webtrees\Http\RequestHandlers\MessagePage;
158use Fisharebest\Webtrees\Http\RequestHandlers\MessageSelect;
159use Fisharebest\Webtrees\Http\RequestHandlers\ModuleAction;
160use Fisharebest\Webtrees\Http\RequestHandlers\ModuleDeleteSettings;
161use Fisharebest\Webtrees\Http\RequestHandlers\ModulesAllAction;
162use Fisharebest\Webtrees\Http\RequestHandlers\ModulesAllPage;
163use Fisharebest\Webtrees\Http\RequestHandlers\ModulesAnalyticsAction;
164use Fisharebest\Webtrees\Http\RequestHandlers\ModulesAnalyticsPage;
165use Fisharebest\Webtrees\Http\RequestHandlers\ModulesBlocksAction;
166use Fisharebest\Webtrees\Http\RequestHandlers\ModulesBlocksPage;
167use Fisharebest\Webtrees\Http\RequestHandlers\ModulesChartsAction;
168use Fisharebest\Webtrees\Http\RequestHandlers\ModulesChartsPage;
169use Fisharebest\Webtrees\Http\RequestHandlers\ModulesDataFixesAction;
170use Fisharebest\Webtrees\Http\RequestHandlers\ModulesDataFixesPage;
171use Fisharebest\Webtrees\Http\RequestHandlers\ModulesFootersAction;
172use Fisharebest\Webtrees\Http\RequestHandlers\ModulesFootersPage;
173use Fisharebest\Webtrees\Http\RequestHandlers\ModulesHistoricEventsAction;
174use Fisharebest\Webtrees\Http\RequestHandlers\ModulesHistoricEventsPage;
175use Fisharebest\Webtrees\Http\RequestHandlers\ModulesLanguagesAction;
176use Fisharebest\Webtrees\Http\RequestHandlers\ModulesLanguagesPage;
177use Fisharebest\Webtrees\Http\RequestHandlers\ModulesListsAction;
178use Fisharebest\Webtrees\Http\RequestHandlers\ModulesListsPage;
179use Fisharebest\Webtrees\Http\RequestHandlers\ModulesMenusAction;
180use Fisharebest\Webtrees\Http\RequestHandlers\ModulesMenusPage;
181use Fisharebest\Webtrees\Http\RequestHandlers\ModulesReportsAction;
182use Fisharebest\Webtrees\Http\RequestHandlers\ModulesReportsPage;
183use Fisharebest\Webtrees\Http\RequestHandlers\ModulesSidebarsAction;
184use Fisharebest\Webtrees\Http\RequestHandlers\ModulesSidebarsPage;
185use Fisharebest\Webtrees\Http\RequestHandlers\ModulesTabsAction;
186use Fisharebest\Webtrees\Http\RequestHandlers\ModulesTabsPage;
187use Fisharebest\Webtrees\Http\RequestHandlers\ModulesThemesAction;
188use Fisharebest\Webtrees\Http\RequestHandlers\ModulesThemesPage;
189use Fisharebest\Webtrees\Http\RequestHandlers\NotePage;
190use Fisharebest\Webtrees\Http\RequestHandlers\PasswordRequestAction;
191use Fisharebest\Webtrees\Http\RequestHandlers\PasswordRequestPage;
192use Fisharebest\Webtrees\Http\RequestHandlers\PasswordResetAction;
193use Fisharebest\Webtrees\Http\RequestHandlers\PasswordResetPage;
194use Fisharebest\Webtrees\Http\RequestHandlers\PasteFact;
195use Fisharebest\Webtrees\Http\RequestHandlers\PendingChanges;
196use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesAcceptChange;
197use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesAcceptRecord;
198use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesAcceptTree;
199use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogAction;
200use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogData;
201use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogDelete;
202use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogDownload;
203use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogPage;
204use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesRejectChange;
205use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesRejectRecord;
206use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesRejectTree;
207use Fisharebest\Webtrees\Http\RequestHandlers\PhpInformation;
208use Fisharebest\Webtrees\Http\RequestHandlers\Ping;
209use Fisharebest\Webtrees\Http\RequestHandlers\RegisterAction;
210use Fisharebest\Webtrees\Http\RequestHandlers\RegisterPage;
211use Fisharebest\Webtrees\Http\RequestHandlers\RenumberTreeAction;
212use Fisharebest\Webtrees\Http\RequestHandlers\RenumberTreePage;
213use Fisharebest\Webtrees\Http\RequestHandlers\ReorderChildrenAction;
214use Fisharebest\Webtrees\Http\RequestHandlers\ReorderChildrenPage;
215use Fisharebest\Webtrees\Http\RequestHandlers\ReorderFamiliesAction;
216use Fisharebest\Webtrees\Http\RequestHandlers\ReorderFamiliesPage;
217use Fisharebest\Webtrees\Http\RequestHandlers\ReorderMediaAction;
218use Fisharebest\Webtrees\Http\RequestHandlers\ReorderMediaPage;
219use Fisharebest\Webtrees\Http\RequestHandlers\ReorderNamesAction;
220use Fisharebest\Webtrees\Http\RequestHandlers\ReorderNamesPage;
221use Fisharebest\Webtrees\Http\RequestHandlers\ReportGenerate;
222use Fisharebest\Webtrees\Http\RequestHandlers\ReportListAction;
223use Fisharebest\Webtrees\Http\RequestHandlers\ReportListPage;
224use Fisharebest\Webtrees\Http\RequestHandlers\ReportSetupAction;
225use Fisharebest\Webtrees\Http\RequestHandlers\ReportSetupPage;
226use Fisharebest\Webtrees\Http\RequestHandlers\RepositoryPage;
227use Fisharebest\Webtrees\Http\RequestHandlers\RobotsTxt;
228use Fisharebest\Webtrees\Http\RequestHandlers\SearchAdvancedAction;
229use Fisharebest\Webtrees\Http\RequestHandlers\SearchAdvancedPage;
230use Fisharebest\Webtrees\Http\RequestHandlers\SearchGeneralAction;
231use Fisharebest\Webtrees\Http\RequestHandlers\SearchGeneralPage;
232use Fisharebest\Webtrees\Http\RequestHandlers\SearchPhoneticAction;
233use Fisharebest\Webtrees\Http\RequestHandlers\SearchPhoneticPage;
234use Fisharebest\Webtrees\Http\RequestHandlers\SearchQuickAction;
235use Fisharebest\Webtrees\Http\RequestHandlers\SearchReplaceAction;
236use Fisharebest\Webtrees\Http\RequestHandlers\SearchReplacePage;
237use Fisharebest\Webtrees\Http\RequestHandlers\Select2Family;
238use Fisharebest\Webtrees\Http\RequestHandlers\Select2Individual;
239use Fisharebest\Webtrees\Http\RequestHandlers\Select2MediaObject;
240use Fisharebest\Webtrees\Http\RequestHandlers\Select2Note;
241use Fisharebest\Webtrees\Http\RequestHandlers\Select2Place;
242use Fisharebest\Webtrees\Http\RequestHandlers\Select2Repository;
243use Fisharebest\Webtrees\Http\RequestHandlers\Select2Source;
244use Fisharebest\Webtrees\Http\RequestHandlers\Select2Submitter;
245use Fisharebest\Webtrees\Http\RequestHandlers\SelectDefaultTree;
246use Fisharebest\Webtrees\Http\RequestHandlers\SelectLanguage;
247use Fisharebest\Webtrees\Http\RequestHandlers\SelectNewFact;
248use Fisharebest\Webtrees\Http\RequestHandlers\SelectTheme;
249use Fisharebest\Webtrees\Http\RequestHandlers\SiteLogsAction;
250use Fisharebest\Webtrees\Http\RequestHandlers\SiteLogsData;
251use Fisharebest\Webtrees\Http\RequestHandlers\SiteLogsDelete;
252use Fisharebest\Webtrees\Http\RequestHandlers\SiteLogsDownload;
253use Fisharebest\Webtrees\Http\RequestHandlers\SiteLogsPage;
254use Fisharebest\Webtrees\Http\RequestHandlers\SitePreferencesAction;
255use Fisharebest\Webtrees\Http\RequestHandlers\SitePreferencesPage;
256use Fisharebest\Webtrees\Http\RequestHandlers\SiteRegistrationAction;
257use Fisharebest\Webtrees\Http\RequestHandlers\SiteRegistrationPage;
258use Fisharebest\Webtrees\Http\RequestHandlers\SourcePage;
259use Fisharebest\Webtrees\Http\RequestHandlers\SubmissionPage;
260use Fisharebest\Webtrees\Http\RequestHandlers\SubmitterPage;
261use Fisharebest\Webtrees\Http\RequestHandlers\SynchronizeTrees;
262use Fisharebest\Webtrees\Http\RequestHandlers\TreePage;
263use Fisharebest\Webtrees\Http\RequestHandlers\TreePageBlock;
264use Fisharebest\Webtrees\Http\RequestHandlers\TreePageBlockEdit;
265use Fisharebest\Webtrees\Http\RequestHandlers\TreePageBlockUpdate;
266use Fisharebest\Webtrees\Http\RequestHandlers\TreePageDefaultEdit;
267use Fisharebest\Webtrees\Http\RequestHandlers\TreePageDefaultUpdate;
268use Fisharebest\Webtrees\Http\RequestHandlers\TreePageEdit;
269use Fisharebest\Webtrees\Http\RequestHandlers\TreePageUpdate;
270use Fisharebest\Webtrees\Http\RequestHandlers\TreePreferencesAction;
271use Fisharebest\Webtrees\Http\RequestHandlers\TreePreferencesPage;
272use Fisharebest\Webtrees\Http\RequestHandlers\TreePrivacyAction;
273use Fisharebest\Webtrees\Http\RequestHandlers\TreePrivacyPage;
274use Fisharebest\Webtrees\Http\RequestHandlers\UnconnectedAction;
275use Fisharebest\Webtrees\Http\RequestHandlers\UnconnectedPage;
276use Fisharebest\Webtrees\Http\RequestHandlers\UploadMediaAction;
277use Fisharebest\Webtrees\Http\RequestHandlers\UploadMediaPage;
278use Fisharebest\Webtrees\Http\RequestHandlers\UserAddAction;
279use Fisharebest\Webtrees\Http\RequestHandlers\UserAddPage;
280use Fisharebest\Webtrees\Http\RequestHandlers\UserEditAction;
281use Fisharebest\Webtrees\Http\RequestHandlers\UserEditPage;
282use Fisharebest\Webtrees\Http\RequestHandlers\UserListData;
283use Fisharebest\Webtrees\Http\RequestHandlers\UserListPage;
284use Fisharebest\Webtrees\Http\RequestHandlers\UserPage;
285use Fisharebest\Webtrees\Http\RequestHandlers\UserPageBlock;
286use Fisharebest\Webtrees\Http\RequestHandlers\UserPageBlockEdit;
287use Fisharebest\Webtrees\Http\RequestHandlers\UserPageBlockUpdate;
288use Fisharebest\Webtrees\Http\RequestHandlers\UserPageDefaultEdit;
289use Fisharebest\Webtrees\Http\RequestHandlers\UserPageDefaultUpdate;
290use Fisharebest\Webtrees\Http\RequestHandlers\UserPageEdit;
291use Fisharebest\Webtrees\Http\RequestHandlers\UserPageUpdate;
292use Fisharebest\Webtrees\Http\RequestHandlers\UsersCleanupAction;
293use Fisharebest\Webtrees\Http\RequestHandlers\UsersCleanupPage;
294use Fisharebest\Webtrees\Http\RequestHandlers\VerifyEmail;
295
296/**
297 * Routing table for web requests
298 */
299class WebRoutes
300{
301    public function load(Map $router): void
302    {
303        $router->attach('', '', static function (Map $router) {
304            // Admin routes.
305            $router->attach('', '/admin', static function (Map $router) {
306                $router->extras([
307                    'middleware' => [
308                        AuthAdministrator::class,
309                    ],
310                ]);
311
312                $router->get(ControlPanel::class, '');
313                $router->get(BroadcastPage::class, '/broadcast');
314                $router->post(BroadcastAction::class, '/broadcast');
315                $router->get(CleanDataFolder::class, '/clean');
316                $router->post(DeletePath::class, '/delete-path');
317                $router->get(EmailPreferencesPage::class, '/email');
318                $router->post(EmailPreferencesAction::class, '/email');
319                $router->get(PhpInformation::class, '/information');
320                $router->get(SiteLogsPage::class, '/logs');
321                $router->post(SiteLogsAction::class, '/logs');
322                $router->get(SiteLogsData::class, '/logs-data');
323                $router->post(SiteLogsDelete::class, '/logs-delete');
324                $router->get(SiteLogsDownload::class, '/logs-download');
325                $router->post(Masquerade::class, '/masquerade/{user_id}');
326                $router->get(ManageMediaPage::class, '/media');
327                $router->post(ManageMediaAction::class, '/media');
328                $router->get(ManageMediaData::class, '/media-data');
329                $router->get(UploadMediaPage::class, '/media-upload');
330                $router->post(UploadMediaAction::class, '/media-upload');
331                $router->get(AdminMediaFileDownload::class, '/media-file');
332                $router->get(AdminMediaFileThumbnail::class, '/media-thumbnail');
333                $router->get(CreateTreePage::class, '/trees/create');
334                $router->post(CreateTreeAction::class, '/trees/create');
335                $router->post(SelectDefaultTree::class, '/trees/default/{tree}');
336                $router->post(DeleteTreeAction::class, '/trees/delete/{tree}');
337                $router->get('admin-fix-level-0-media', '/fix-level-0-media', 'Admin\FixLevel0MediaController::fixLevel0Media');
338                $router->post('admin-fix-level-0-media-action', '/fix-level-0-media', 'Admin\FixLevel0MediaController::fixLevel0MediaAction');
339                $router->get('admin-fix-level-0-media-data', '/fix-level-0-media-data', 'Admin\FixLevel0MediaController::fixLevel0MediaData');
340                $router->get('admin-webtrees1-thumbs', '/webtrees1-thumbs', 'Admin\ImportThumbnailsController::webtrees1Thumbnails');
341                $router->post('admin-webtrees1-thumbs-action', '/webtrees1-thumbs', 'Admin\ImportThumbnailsController::webtrees1ThumbnailsAction');
342                $router->get('admin-webtrees1-thumbs-data', '/webtrees1-thumbs-data', 'Admin\ImportThumbnailsController::webtrees1ThumbnailsData');
343                $router->get(UsersCleanupPage::class, '/users-cleanup');
344                $router->post(UsersCleanupAction::class, '/users-cleanup');
345                $router->get(MapDataAdd::class, '/map-data-add{/parent_id}');
346                $router->post(MapDataDelete::class, '/map-data-delete/{place_id}');
347                $router->get(MapDataEdit::class, '/map-data-edit/{place_id}');
348                $router->get(MapDataExportCSV::class, '/map-data-csv{/parent_id}');
349                $router->get(MapDataExportGeoJson::class, '/map-data-geojson{/parent_id}');
350                $router->get(MapDataImportPage::class, '/locations-import');
351                $router->post(MapDataImportAction::class, '/locations-import');
352                $router->get(MapDataList::class, '/map-data{/parent_id}');
353                $router->post(MapDataSave::class, '/map-data-update');
354                $router->get(MapProviderPage::class, '/map-provider');
355                $router->post(MapProviderAction::class, '/map-provider');
356                $router->post(ModuleDeleteSettings::class, '/module-delete-settings');
357                $router->get(ModulesAllPage::class, '/modules');
358                $router->post(ModulesAllAction::class, '/modules');
359                $router->get(ModulesAnalyticsPage::class, '/analytics');
360                $router->post(ModulesAnalyticsAction::class, '/analytics');
361                $router->get(ModulesBlocksPage::class, '/blocks');
362                $router->post(ModulesBlocksAction::class, '/blocks');
363                $router->get(ModulesChartsPage::class, '/charts');
364                $router->post(ModulesChartsAction::class, '/charts');
365                $router->get(ModulesDataFixesPage::class, '/data-fixes');
366                $router->post(ModulesDataFixesAction::class, '/data-fixes');
367                $router->get(ModulesFootersPage::class, '/footers');
368                $router->post(ModulesFootersAction::class, '/footers');
369                $router->get(ModulesHistoricEventsPage::class, '/historic-events');
370                $router->post(ModulesHistoricEventsAction::class, '/historic-events');
371                $router->get(ModulesListsPage::class, '/lists');
372                $router->post(ModulesListsAction::class, '/lists');
373                $router->get(ModulesMenusPage::class, '/menus');
374                $router->post(ModulesMenusAction::class, '/menus');
375                $router->get(ModulesLanguagesPage::class, '/languages');
376                $router->post(ModulesLanguagesAction::class, '/languages');
377                $router->get(ModulesReportsPage::class, '/reports');
378                $router->post(ModulesReportsAction::class, '/reports');
379                $router->get(ModulesSidebarsPage::class, '/sidebars');
380                $router->post(ModulesSidebarsAction::class, '/sidebars');
381                $router->get(ModulesTabsPage::class, '/tabs');
382                $router->post(ModulesTabsAction::class, '/tabs');
383                $router->get(ModulesThemesPage::class, '/themes');
384                $router->post(ModulesThemesAction::class, '/themes');
385                $router->get('upgrade', '/upgrade', 'Admin\UpgradeController::wizard');
386                $router->post('upgrade-confirm', '/upgrade-confirm', 'Admin\UpgradeController::confirm');
387                $router->post('upgrade-action', '/upgrade', 'Admin\UpgradeController::step');
388                $router->get(UserListPage::class, '/admin-users');
389                $router->get(UserListData::class, '/admin-users-data');
390                $router->get(UserAddPage::class, '/admin-users-create');
391                $router->post(UserAddAction::class, '/admin-users-create');
392                $router->get(UserEditPage::class, '/admin-users-edit');
393                $router->post(UserEditAction::class, '/admin-users-edit');
394                $router->get(SitePreferencesPage::class, '/site-preferences');
395                $router->post(SitePreferencesAction::class, '/site-preferences');
396                $router->get(SiteRegistrationPage::class, '/site-registration');
397                $router->post(SiteRegistrationAction::class, '/site-registration');
398                $router->get(TreePageDefaultEdit::class, '/trees/default-blocks');
399                $router->post(TreePageDefaultUpdate::class, '/trees/default-blocks');
400                $router->get(MergeTreesPage::class, '/trees/merge');
401                $router->post(MergeTreesAction::class, '/trees/merge');
402                $router->post(SynchronizeTrees::class, '/trees/sync');
403                $router->post(DeleteUser::class, '/users/delete/{user_id}');
404                $router->get(UserPageDefaultEdit::class, '/user-page-default-edit');
405                $router->post(UserPageDefaultUpdate::class, '/user-page-default-update');
406
407                // @deprecated since 2.0.8 - will be removed in 2.1.0
408                $router->get('modules', '/modules', ModulesAllPage::class);
409            });
410
411            // Manager routes (multiple trees).
412            $router->attach('', '/admin', static function (Map $router) {
413                $router->extras([
414                    'middleware' => [
415                        AuthManager::class,
416                    ],
417                ]);
418
419                $router->get(ManageTrees::class, '/trees/manage/{tree}');
420            });
421
422            // Manager routes.
423            $router->attach('', '/tree/{tree}', static function (Map $router) {
424                $router->extras([
425                    'middleware' => [
426                        AuthManager::class,
427                    ],
428                ]);
429
430                $router->get(PendingChangesLogPage::class, '/changes-log');
431                $router->post(PendingChangesLogAction::class, '/changes-log');
432                $router->get(PendingChangesLogData::class, '/changes-data');
433                $router->post(PendingChangesLogDelete::class, '/changes-delete');
434                $router->get(PendingChangesLogDownload::class, '/changes-download');
435                $router->get(CheckTree::class, '/check');
436                $router->get(DataFixChoose::class, '/data-fix');
437                $router->post(DataFixSelect::class, '/data-fix');
438                $router->get(DataFixPage::class, '/data-fix/{data_fix}');
439                $router->post(DataFixUpdate::class, '/data-fix/{data_fix}/update');
440                $router->post(DataFixUpdateAll::class, '/data-fix/{data_fix}/update-all');
441                $router->get(DataFixData::class, '/data-fix/{data_fix}/data');
442                $router->get(DataFixPreview::class, '/data-fix/{data_fix}/preview');
443                $router->get(FindDuplicateRecords::class, '/duplicates');
444                $router->get(ExportGedcomPage::class, '/export');
445                $router->post(ExportGedcomClient::class, '/export-client');
446                $router->post(ExportGedcomServer::class, '/export-server');
447                $router->get(ImportGedcomPage::class, '/import');
448                $router->post(ImportGedcomAction::class, '/import');
449                $router->get(MergeRecordsPage::class, '/merge-step1');
450                $router->post(MergeRecordsAction::class, '/merge-step1');
451                $router->get(MergeFactsPage::class, '/merge-step2');
452                $router->post(MergeFactsAction::class, '/merge-step2');
453                $router->get(TreePreferencesPage::class, '/preferences');
454                $router->post(TreePreferencesAction::class, '/preferences');
455                $router->get(RenumberTreePage::class, '/renumber');
456                $router->post(RenumberTreeAction::class, '/renumber');
457                $router->get(TreePageEdit::class, '/tree-page-edit');
458                $router->post(GedcomLoad::class, '/load');
459                $router->post(TreePageUpdate::class, '/tree-page-update');
460                $router->get(TreePageBlockEdit::class, '/tree-page-block-edit');
461                $router->post(TreePageBlockUpdate::class, '/tree-page-block-edit');
462                $router->get(TreePrivacyPage::class, '/privacy');
463                $router->post(TreePrivacyAction::class, '/privacy');
464                $router->get(UnconnectedPage::class, '/unconnected');
465                $router->post(UnconnectedAction::class, '/unconnected');
466            });
467
468            // Moderator routes.
469            $router->attach('', '/tree/{tree}', static function (Map $router) {
470                $router->extras([
471                    'middleware' => [
472                        AuthModerator::class,
473                    ],
474                ]);
475                $router->post(PendingChangesAcceptTree::class, '/accept');
476                $router->post(PendingChangesAcceptRecord::class, '/accept/{xref}');
477                $router->post(PendingChangesAcceptChange::class, '/accept/{xref}/{change}');
478                $router->get(PendingChanges::class, '/pending');
479                $router->post(PendingChangesRejectTree::class, '/reject');
480                $router->post(PendingChangesRejectRecord::class, '/reject/{xref}');
481                $router->post(PendingChangesRejectChange::class, '/reject/{xref}/{change}');
482            });
483
484            // Editor routes.
485            $router->attach('', '/tree/{tree}', static function (Map $router) {
486                $router->extras([
487                    'middleware' => [
488                        AuthEditor::class,
489                    ],
490                ]);
491
492                $router->get(AutoCompleteCitation::class, '/autocomplete/citation/{query}');
493                $router->get(AutoCompleteFolder::class, '/autocomplete/folder/{query}');
494                $router->get(AutoCompletePlace::class, '/autocomplete/place/{query}');
495                $router->get(AutoCompleteSurname::class, '/autocomplete/surname/{query}');
496                $router->get(AddChildToFamilyPage::class, '/add-child-to-family');
497                $router->post(AddChildToFamilyAction::class, '/add-child-to-family');
498                $router->get(AddNewFact::class, '/add-fact/{xref}/{fact}');
499                $router->post(SelectNewFact::class, '/add-fact/{xref}');
500                $router->get(AddMediaFileModal::class, '/add-media-file/{xref}');
501                $router->post(AddMediaFileAction::class, '/add-media-file/{xref}');
502                $router->get(AddName::class, '/add-name');
503                $router->get(AddSpouseToFamilyPage::class, '/add-spouse-to-family');
504                $router->post(AddSpouseToFamilyAction::class, '/add-spouse-to-family');
505                $router->get(ChangeFamilyMembersPage::class, '/change-family-members');
506                $router->post(ChangeFamilyMembersAction::class, '/change-family-members');
507                $router->get(CreateMediaObjectModal::class, '/create-media-object');
508                $router->post(CreateMediaObjectAction::class, '/create-media-object');
509                $router->post(CreateMediaObjectFromFile::class, '/create-media-from-file');
510                $router->post(CopyFact::class, '/copy/{xref}/{fact_id}');
511                $router->get(CreateNoteModal::class, '/create-note-object');
512                $router->post(CreateNoteAction::class, '/create-note-object');
513                $router->get(CreateRepositoryModal::class, '/create-repository');
514                $router->post(CreateRepositoryAction::class, '/create-repository');
515                $router->get(CreateSourceModal::class, '/create-source');
516                $router->post(CreateSourceAction::class, '/create-source');
517                $router->get(CreateSubmitterModal::class, '/create-submitter');
518                $router->post(CreateSubmitterAction::class, '/create-submitter');
519                $router->post(DeleteRecord::class, '/delete/{xref}');
520                $router->post(DeleteFact::class, '/delete/{xref}/{fact_id}');
521                $router->get(EditFactPage::class, '/edit-fact/{xref}/{fact_id}');
522                $router->post(EditFactAction::class, '/update-fact/{xref}{/fact_id}');
523                $router->get(EditMediaFileModal::class, '/edit-media-file/{xref}/{fact_id}');
524                $router->post(EditMediaFileAction::class, '/edit-media-file/{xref}/{fact_id}');
525                $router->get(EditNotePage::class, '/edit-note-object/{xref}');
526                $router->post(EditNoteAction::class, '/edit-note-object/{xref}');
527                $router->get(EditRawFactPage::class, '/edit-raw/{xref}/{fact_id}');
528                $router->post(EditRawFactAction::class, '/edit-raw/{xref}/{fact_id}');
529                $router->get(EditRawRecordPage::class, '/edit-raw/{xref}');
530                $router->post(EditRawRecordAction::class, '/edit-raw/{xref}');
531                $router->get(LinkMediaToFamilyModal::class, '/link-media-to-family/{xref}');
532                $router->get(LinkMediaToIndividualModal::class, '/link-media-to-individual/{xref}');
533                $router->get(LinkMediaToSourceModal::class, '/link-media-to-source/{xref}');
534                $router->post(LinkMediaToRecordAction::class, '/link-media-to-record/{xref}');
535                $router->post(PasteFact::class, '/paste-fact/{xref}');
536                $router->get(ReorderChildrenPage::class, '/reorder-children/{xref}');
537                $router->post(ReorderChildrenAction::class, '/reorder-children/{xref}');
538                $router->get(ReorderMediaPage::class, '/reorder-media/{xref}');
539                $router->post(ReorderMediaAction::class, '/reorder-media/{xref}');
540                $router->get(ReorderNamesPage::class, '/reorder-names/{xref}');
541                $router->post(ReorderNamesAction::class, '/reorder-names/{xref}');
542                $router->get(ReorderFamiliesPage::class, '/reorder-spouses/{xref}');
543                $router->post(ReorderFamiliesAction::class, '/reorder-spouses/{xref}');
544                $router->get(SearchReplacePage::class, '/search-replace');
545                $router->post(SearchReplaceAction::class, '/search-replace');
546                $router->get(AddChildToIndividualPage::class, '/add-child-to-individual');
547                $router->post(AddChildToIndividualAction::class, '/add-child-to-individual');
548                $router->get(AddParentToIndividualPage::class, '/add-parent-to-individual');
549                $router->post(AddParentToIndividualAction::class, '/add-parent-to-individual');
550                $router->get(AddSpouseToIndividualPage::class, '/add-spouse-to-individual');
551                $router->post(AddSpouseToIndividualAction::class, '/add-spouse-to-individual');
552                $router->get(AddUnlinkedPage::class, '/add-unlinked-individual');
553                $router->post(AddUnlinkedAction::class, '/add-unlinked-individual');
554                $router->get(LinkChildToFamilyPage::class, '/link-child-to-family');
555                $router->post(LinkChildToFamilyAction::class, '/link-child-to-family');
556                $router->get(LinkSpouseToIndividualPage::class, '/link-spouse-to-individual');
557                $router->post(LinkSpouseToIndividualAction::class, '/link-spouse-to-individual');
558                $router->get(EditName::class, '/edit-name/{xref}/{fact_id}');
559            });
560
561            // User routes with a tree.
562            $router->attach('', '/tree/{tree}', static function (Map $router) {
563                $router->extras([
564                    'middleware' => [
565                        AuthLoggedIn::class,
566                    ],
567                ]);
568
569                $router->post(MessageSelect::class, '/message-select');
570                $router->get(MessagePage::class, '/message-compose');
571                $router->post(MessageAction::class, '/message-send');
572                $router->get(UserPage::class, '/my-page');
573                $router->get(UserPageBlock::class, '/my-page-block');
574                $router->get(UserPageEdit::class, '/my-page-edit');
575                $router->post(UserPageUpdate::class, '/my-page-edit');
576                $router->get(UserPageBlockEdit::class, '/my-page-block-edit');
577                $router->post(UserPageBlockUpdate::class, '/my-page-block-edit');
578            });
579
580            // User routes without a tree.
581            $router->attach('', '', static function (Map $router) {
582                $router->extras([
583                    'middleware' => [
584                        AuthLoggedIn::class,
585                    ],
586                ]);
587
588                $router->get(AccountEdit::class, '/my-account{/tree}');
589                $router->post(AccountUpdate::class, '/my-account{/tree}');
590                $router->post(AccountDelete::class, '/my-account-delete');
591            });
592
593            // Visitor routes - with an optional tree (for sites with no public trees).
594            $router->attach('', '', static function (Map $router) {
595                $router->get(LoginPage::class, '/login{/tree}');
596                $router->post(LoginAction::class, '/login{/tree}');
597                $router->get(PasswordRequestPage::class, '/password-request{/tree}');
598                $router->post(PasswordRequestAction::class, '/password-request{/tree}');
599                $router->get(RegisterPage::class, '/register{/tree}');
600                $router->post(RegisterAction::class, '/register{/tree}');
601                $router->get(PasswordResetPage::class, '/password-reset/{token}{/tree}');
602                $router->post(PasswordResetAction::class, '/password-reset/{token}{/tree}');
603                $router->get(VerifyEmail::class, '/verify/{username}/{token}{/tree}');
604            });
605
606            // Visitor routes with a tree.
607            $router->attach('', '/tree/{tree}', static function (Map $router) {
608                $router->get(TreePage::class, '');
609                $router->get(CalendarPage::class, '/calendar/{view}');
610                $router->post(CalendarAction::class, '/calendar/{view}');
611                $router->get(CalendarEvents::class, '/calendar-events/{view}');
612                $router->get(ContactPage::class, '/contact');
613                $router->post(ContactAction::class, '/contact');
614                $router->get(FamilyPage::class, '/family/{xref}{/slug}');
615                $router->get(HeaderPage::class, '/header/{xref}{/slug}');
616                $router->get(IndividualPage::class, '/individual/{xref}{/slug}');
617                $router->get(MediaFileThumbnail::class, '/media-thumbnail');
618                $router->get(MediaFileDownload::class, '/media-download');
619                $router->get(MediaPage::class, '/media/{xref}{/slug}');
620                $router->get(NotePage::class, '/note/{xref}{/slug}');
621                $router->get(GedcomRecordPage::class, '/record/{xref}{/slug}');
622                $router->get(RepositoryPage::class, '/repository/{xref}{/slug}');
623                $router->get(ReportListPage::class, '/report');
624                $router->post(ReportListAction::class, '/report');
625                $router->get(ReportSetupPage::class, '/report/{report}');
626                $router->post(ReportSetupAction::class, '/report/{report}');
627                $router->get(ReportGenerate::class, '/report-run/{report}');
628                $router->get(SearchAdvancedPage::class, '/search-advanced');
629                $router->post(SearchAdvancedAction::class, '/search-advanced');
630                $router->get(SearchGeneralPage::class, '/search-general');
631                $router->post(SearchGeneralAction::class, '/search-general');
632                $router->get(SearchPhoneticPage::class, '/search-phonetic');
633                $router->post(SearchPhoneticAction::class, '/search-phonetic');
634                $router->post(SearchQuickAction::class, '/search-quick');
635                $router->post(Select2Family::class, '/select2-family');
636                $router->post(Select2Individual::class, '/select2-individual');
637                $router->post(Select2MediaObject::class, '/select2-media');
638                $router->post(Select2Note::class, '/select2-note');
639                $router->post(Select2Place::class, '/select2-place');
640                $router->post(Select2Source::class, '/select2-source');
641                $router->post(Select2Submitter::class, '/select2-submitter');
642                $router->post(Select2Repository::class, '/select2-repository');
643                $router->get(SourcePage::class, '/source/{xref}{/slug}');
644                $router->get(SubmissionPage::class, '/submission/{xref}{/slug}');
645                $router->get(SubmitterPage::class, '/submitter/{xref}{/slug}');
646                $router->get(TreePageBlock::class, '/tree-page-block');
647                $router->get('example', '/…')
648                    ->isRoutable(false);
649            });
650
651            // Match module routes, with and without a tree.
652            $router->get('module-tree', '/module/{module}/{action}/{tree}', ModuleAction::class)
653                ->allows(RequestMethodInterface::METHOD_POST);
654            $router->get('module-no-tree', '/module/{module}/{action}', ModuleAction::class)
655                ->allows(RequestMethodInterface::METHOD_POST);
656            // Generate module routes only. The router cannot distinguish a private tree from no tree.
657            $router->get('module', '/module/{module}/{action}{/tree}')
658                ->isRoutable(false);
659
660            $router->get(HelpText::class, '/help/{topic}');
661            $router->post(SelectLanguage::class, '/language/{language}');
662            $router->post(Logout::class, '/logout');
663            $router->get(Ping::class, '/ping', Ping::class)
664                ->allows(RequestMethodInterface::METHOD_HEAD);
665            $router->get(RobotsTxt::class, '/robots.txt');
666            $router->post(SelectTheme::class, '/theme/{theme}');
667            $router->get(HomePage::class, '/');
668
669            // Some URL rewrite configurations will pass everything not in /public to index.php
670            $router->get(AppleTouchIconPng::class, '/apple-touch-icon.png');
671            $router->get(FaviconIco::class, '/favicon.ico');
672        });
673    }
674}
675