diff --git a/README.md b/README.md index fb87bd0..7d8ca5d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Family Tree Home Page Make your family tree appear on the front page for all site users. -This is a custom module for [webtrees v2.1](https://github.com/fisharebest/webtrees). +This is a custom module for [webtrees v2.1 and v2.2](https://github.com/fisharebest/webtrees). Whenever someone visits your front page or signs in from the front page, they should land back on the front page again instead of seeing "My Page". diff --git a/module.php b/module.php index 91f11cf..b3a1a64 100644 --- a/module.php +++ b/module.php @@ -1,7 +1,7 @@ getMap(); + if (version_compare(Webtrees::VERSION, '2.2.0', '>=')) { + $router = Registry::container()->get(RouterContainer::class)->getMap(); + } else { + $router = app(RouterContainer::class)->getMap(); + } // Retrieve the entire routing table. $routes = $router->getRoutes(); @@ -114,7 +120,7 @@ public function customModuleAuthorName(): string */ public function customModuleVersion(): string { - return '1.0.03'; + return '1.0.04'; } /**