diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2023-04-01 12:56:16 +0100 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2023-04-03 22:37:37 +0100 |
| commit | d7de6d4c220d78064a12e37f3ddf086b400264cf (patch) | |
| tree | cef2ed774e64dadd6d5bd3fe1bec9ebea8a335a9 /index.php | |
| parent | d35568b467207589ea9059739da0bf1f7e785a0d (diff) | |
| download | webtrees-d7de6d4c220d78064a12e37f3ddf086b400264cf.tar.gz webtrees-d7de6d4c220d78064a12e37f3ddf086b400264cf.tar.bz2 webtrees-d7de6d4c220d78064a12e37f3ddf086b400264cf.zip | |
Refactor startup code to allow /public/ to be the web root
Diffstat (limited to 'index.php')
| -rw-r--r-- | index.php | 22 |
1 files changed, 1 insertions, 21 deletions
@@ -19,22 +19,8 @@ declare(strict_types=1); namespace Fisharebest\Webtrees; -use function is_file; -use function is_string; -use function parse_url; - -use const PHP_SAPI; -use const PHP_URL_PATH; - require __DIR__ . '/vendor/autoload.php'; -if (PHP_SAPI === 'cli-server') { - $file = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); - if (is_string($file) && is_file($file)) { - return false; - } -} - // @see https://github.com/briannesbitt/Carbon/issues/2536 $file = '/vendor/symfony/translation/TranslatorInterface.php'; if (file_exists(__DIR__ . $file) && !unlink(__DIR__ . $file)) { @@ -43,10 +29,4 @@ if (file_exists(__DIR__ . $file) && !unlink(__DIR__ . $file)) { } $webtrees = new Webtrees(); -$webtrees->bootstrap(); - -if (PHP_SAPI === 'cli') { - $webtrees->cliRequest(); -} else { - $webtrees->httpRequest(); -} +$webtrees->bootstrap()->run(); |
