From 218e41a818fb0bed0c2733fa6be831b5287a747f Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Mon, 18 Feb 2019 00:26:38 +0100 Subject: [PATCH 1/2] Bugfixing index.php --- index.php | 2 +- src/App.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index 47264362c5..e989872893 100644 --- a/index.php +++ b/index.php @@ -12,6 +12,6 @@ if (!file_exists(__DIR__ . '/vendor/autoload.php')) { require __DIR__ . '/vendor/autoload.php'; -$a = Factory\DependencyFactory::setUp('index', __DIR__, true); +$a = Factory\DependencyFactory::setUp('index', __DIR__, false); $a->runFrontend(); diff --git a/src/App.php b/src/App.php index ca2b6dfc21..f48abcf9cb 100644 --- a/src/App.php +++ b/src/App.php @@ -214,18 +214,18 @@ class App */ public function __construct(Configuration $config, LoggerInterface $logger, Profiler $profiler, $isBackend = true) { + BaseObject::setApp($this); + $this->logger = $logger; $this->config = $config; $this->profiler = $profiler; $this->basePath = $this->config->get('system', 'basepath'); if (!Core\System::isDirectoryUsable($this->basePath, false)) { - throw new Exception('Basepath ' . $this->basePath . ' isn\'t usable.'); + throw new Exception('Basepath \'' . $this->basePath . '\' isn\'t usable.'); } $this->basePath = rtrim($this->basePath, DIRECTORY_SEPARATOR); - BaseObject::setApp($this); - $this->checkBackend($isBackend); $this->checkFriendicaApp(); From 95deff1685ceff88e7acd002b2341913cc51f011 Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Mon, 18 Feb 2019 01:15:55 +0100 Subject: [PATCH 2/2] use cache for basepath --- src/App.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.php b/src/App.php index f48abcf9cb..f41d486b5c 100644 --- a/src/App.php +++ b/src/App.php @@ -219,7 +219,7 @@ class App $this->logger = $logger; $this->config = $config; $this->profiler = $profiler; - $this->basePath = $this->config->get('system', 'basepath'); + $this->basePath = $this->config->getCache()->get('system', 'basepath'); if (!Core\System::isDirectoryUsable($this->basePath, false)) { throw new Exception('Basepath \'' . $this->basePath . '\' isn\'t usable.');