mirror of
https://github.com/friendica/friendica
synced 2025-01-31 05:39:48 +00:00
Inject Mode into App::load() via parameter
This commit is contained in:
parent
064b70f4c0
commit
76aec2d575
1 changed files with 3 additions and 2 deletions
|
@ -162,6 +162,7 @@ class App
|
||||||
$request->getServerParams(),
|
$request->getServerParams(),
|
||||||
$this->container->create(DbaDefinition::class),
|
$this->container->create(DbaDefinition::class),
|
||||||
$this->container->create(ViewDefinition::class),
|
$this->container->create(ViewDefinition::class),
|
||||||
|
$this->mode,
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->registerTemplateEngine();
|
$this->registerTemplateEngine();
|
||||||
|
@ -270,7 +271,7 @@ class App
|
||||||
/**
|
/**
|
||||||
* Load the whole app instance
|
* Load the whole app instance
|
||||||
*/
|
*/
|
||||||
private function load(array $serverParams, DbaDefinition $dbaDefinition, ViewDefinition $viewDefinition)
|
private function load(array $serverParams, DbaDefinition $dbaDefinition, ViewDefinition $viewDefinition, Mode $mode)
|
||||||
{
|
{
|
||||||
if ($this->config->get('system', 'ini_max_execution_time') !== false) {
|
if ($this->config->get('system', 'ini_max_execution_time') !== false) {
|
||||||
set_time_limit((int)$this->config->get('system', 'ini_max_execution_time'));
|
set_time_limit((int)$this->config->get('system', 'ini_max_execution_time'));
|
||||||
|
@ -290,7 +291,7 @@ class App
|
||||||
|
|
||||||
$this->profiler->reset();
|
$this->profiler->reset();
|
||||||
|
|
||||||
if ($this->mode->has(Mode::DBAVAILABLE)) {
|
if ($mode->has(Mode::DBAVAILABLE)) {
|
||||||
Core\Hook::loadHooks();
|
Core\Hook::loadHooks();
|
||||||
$loader = (new Config())->createConfigFileManager($this->appHelper->getBasePath(), $serverParams);
|
$loader = (new Config())->createConfigFileManager($this->appHelper->getBasePath(), $serverParams);
|
||||||
Core\Hook::callAll('load_config', $loader);
|
Core\Hook::callAll('load_config', $loader);
|
||||||
|
|
Loading…
Add table
Reference in a new issue