diff options
| author | Greg Roach <fisharebest@gmail.com> | 2018-01-10 21:43:33 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2018-01-13 11:26:45 +0000 |
| commit | 225e381f36d59b49c8cdac0060465fa5af2fc308 (patch) | |
| tree | 89cdab8ff4f2fd708b54c292ed2339c2028d38a4 /family.php | |
| parent | 181186b616da35d9a7627f0b17fa144ff9355c99 (diff) | |
| download | webtrees-225e381f36d59b49c8cdac0060465fa5af2fc308.tar.gz webtrees-225e381f36d59b49c8cdac0060465fa5af2fc308.tar.bz2 webtrees-225e381f36d59b49c8cdac0060465fa5af2fc308.zip | |
Use views for genealogy objects
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'; |
