diff options
Diffstat (limited to 'family.php')
| -rw-r--r-- | family.php | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/family.php b/family.php index 2c2faec2a5..62c607100e 100644 --- a/family.php +++ b/family.php @@ -13,34 +13,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -namespace Fisharebest\Webtrees; -use Fisharebest\Webtrees\Controller\FamilyController; +// Redirect legacy URLs to the new router. +$_GET['xref'] = $_GET['famid'] ?? ''; +$_GET['route'] = 'family'; -/** @global Tree $WT_TREE */ -global $WT_TREE; - -require 'includes/session.php'; - -$record = Family::getInstance(Filter::get('famid', WT_REGEX_XREF), $WT_TREE); -$controller = new FamilyController($record); - -if ($controller->record && $controller->record->canShow()) { - $controller->pageHeader(); -} else { - http_response_code(404); - $controller->pageHeader(); - - echo View::make('alerts/danger', [ - 'alert' => I18N::translate('This family does not exist or you do not have permission to view it.'), - ]); - - return; -} - -$facts = $controller->record->getFacts(null, true); - -echo View::make('family-page', [ - 'family' => $controller->record, - 'facts' => $facts, -]); +require __DIR__ . '/index.php'; |
