122e73debSGreg Roach<?php 222e73debSGreg Roach 322e73debSGreg Roach/** 422e73debSGreg Roach * webtrees: online genealogy 522e73debSGreg Roach * Copyright (C) 2019 webtrees development team 622e73debSGreg Roach * This program is free software: you can redistribute it and/or modify 722e73debSGreg Roach * it under the terms of the GNU General Public License as published by 822e73debSGreg Roach * the Free Software Foundation, either version 3 of the License, or 922e73debSGreg Roach * (at your option) any later version. 1022e73debSGreg Roach * This program is distributed in the hope that it will be useful, 1122e73debSGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 1222e73debSGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1322e73debSGreg Roach * GNU General Public License for more details. 1422e73debSGreg Roach * You should have received a copy of the GNU General Public License 1522e73debSGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>. 1622e73debSGreg Roach */ 1722e73debSGreg Roach 1822e73debSGreg Roachdeclare(strict_types=1); 1922e73debSGreg Roach 2022e73debSGreg Roachnamespace Fisharebest\Webtrees\Http\RequestHandlers; 2122e73debSGreg Roach 2222e73debSGreg Roachuse Psr\Http\Message\ResponseInterface; 2322e73debSGreg Roachuse Psr\Http\Message\ServerRequestInterface; 2422e73debSGreg Roachuse Psr\Http\Server\RequestHandlerInterface; 2522e73debSGreg Roach 2622e73debSGreg Roach/** 2722e73debSGreg Roach * Show pending changes. 2822e73debSGreg Roach */ 2922e73debSGreg Roachclass PendingChangesLogAction implements RequestHandlerInterface 3022e73debSGreg Roach{ 3122e73debSGreg Roach /** 3222e73debSGreg Roach * @param ServerRequestInterface $request 3322e73debSGreg Roach * 3422e73debSGreg Roach * @return ResponseInterface 3522e73debSGreg Roach */ 3622e73debSGreg Roach public function handle(ServerRequestInterface $request): ResponseInterface 3722e73debSGreg Roach { 38*b46c87bdSGreg Roach $params = (array) $request->getParsedBody(); 39*b46c87bdSGreg Roach 4022e73debSGreg Roach return redirect(route(PendingChangesLogPage::class, [ 41*b46c87bdSGreg Roach 'tree' => $params['tree'], 42*b46c87bdSGreg Roach 'from' => $params['from'] ?? '', 43*b46c87bdSGreg Roach 'to' => $params['to'] ?? '', 44*b46c87bdSGreg Roach 'type' => $params['type'] ?? '', 45*b46c87bdSGreg Roach 'oldged' => $params['oldged'] ?? '', 46*b46c87bdSGreg Roach 'newged' => $params['newged'] ?? '', 47*b46c87bdSGreg Roach 'xref' => $params['xref'] ?? '', 48*b46c87bdSGreg Roach 'username' => $params['username'] ?? '', 4922e73debSGreg Roach ])); 5022e73debSGreg Roach } 5122e73debSGreg Roach} 52