Update bootstrap.php

Temporary crutch for update from rev.48-
This commit is contained in:
Visman 2022-02-09 21:32:06 +07:00
parent 1f64397404
commit 60e9cbcbb8

View file

@ -13,6 +13,7 @@ namespace ForkBB;
use ForkBB\Core\Container;
use ForkBB\Core\ErrorHandler;
use ForkBB\Models\Page;
use Exception;
use RuntimeException;
\error_reporting(\E_ALL ^ \E_NOTICE);
@ -56,20 +57,30 @@ if (
} else {
$c->BASE_URL = \str_replace('https://', 'http://', $c->BASE_URL);
}
$c->PUBLIC_URL = $c->BASE_URL . $forkPublicPrefix;
$c->FORK_REVISION = 48;
$c->START = $forkStart;
$c->DIR_APP = __DIR__;
$c->DIR_PUBLIC = \realpath(__DIR__ . '/../public');
$c->DIR_CACHE = __DIR__ . '/cache';
$c->DIR_VIEWS = __DIR__ . '/templates';
$c->DIR_LANG = __DIR__ . '/lang';
$c->DIR_LOG = __DIR__ . '/log';
$c->DATE_FORMATS = ['Y-m-d', 'd M Y', 'Y-m-d', 'Y-d-m', 'd-m-Y', 'm-d-Y', 'M j Y', 'jS M Y'];
$c->TIME_FORMATS = ['H:i:s', 'H:i', 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'];
$c->PUBLIC_URL = $c->BASE_URL . $forkPublicPrefix;
// Temporary crutch for update from rev.48-
try {
$e = $c->DIR_ROOT;
} catch (Exception $e) {
$c->DIR_APP = __DIR__;
$c->DIR_PUBLIC = \realpath(__DIR__ . '/../public');
$c->DIR_CACHE = __DIR__ . '/cache';
$c->DIR_CONFIG = __DIR__ . '/config';
$c->DIR_VIEWS = __DIR__ . '/templates';
$c->DIR_LANG = __DIR__ . '/lang';
$c->DIR_LOG = __DIR__ . '/log';
$c->DATE_FORMATS = ['Y-m-d', 'd M Y', 'Y-m-d', 'Y-d-m', 'd-m-Y', 'm-d-Y', 'M j Y', 'jS M Y'];
$c->TIME_FORMATS = ['H:i:s', 'H:i', 'H:i:s', 'H:i', 'g:i:s a', 'g:i a'];
} finally {
unset($e);
}
$controllers = ['Primary', 'Routing'];
foreach ($controllers as $controller) {
$page = $c->{$controller};