summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2023-04-01 12:56:16 +0100
committerGreg Roach <greg@subaqua.co.uk>2023-04-03 22:37:37 +0100
commitd7de6d4c220d78064a12e37f3ddf086b400264cf (patch)
treecef2ed774e64dadd6d5bd3fe1bec9ebea8a335a9 /index.php
parentd35568b467207589ea9059739da0bf1f7e785a0d (diff)
downloadwebtrees-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.php22
1 files changed, 1 insertions, 21 deletions
diff --git a/index.php b/index.php
index e25837db3c..bd4c6e4c7b 100644
--- a/index.php
+++ b/index.php
@@ -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();