diff options
author | ArthurHoaro <arthur.hoareau@wizacha.com> | 2020-07-07 10:15:56 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-07-23 21:19:21 +0200 |
commit | c4ad3d4f061d05a01db25aa54dda830ba776792d (patch) | |
tree | 691d91a5b0bbac62cee41f7b95ad1daa38d610b3 /application/front/ShaarliMiddleware.php | |
parent | 1a8ac737e52cb25a5c346232ee398f5908cee7d7 (diff) | |
download | Shaarli-c4ad3d4f061d05a01db25aa54dda830ba776792d.tar.gz Shaarli-c4ad3d4f061d05a01db25aa54dda830ba776792d.tar.zst Shaarli-c4ad3d4f061d05a01db25aa54dda830ba776792d.zip |
Process Shaarli install through Slim controller
Diffstat (limited to 'application/front/ShaarliMiddleware.php')
-rw-r--r-- | application/front/ShaarliMiddleware.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/application/front/ShaarliMiddleware.php b/application/front/ShaarliMiddleware.php index baea6ef2..595182ac 100644 --- a/application/front/ShaarliMiddleware.php +++ b/application/front/ShaarliMiddleware.php | |||
@@ -43,6 +43,12 @@ class ShaarliMiddleware | |||
43 | $this->container->basePath = rtrim($request->getUri()->getBasePath(), '/'); | 43 | $this->container->basePath = rtrim($request->getUri()->getBasePath(), '/'); |
44 | 44 | ||
45 | try { | 45 | try { |
46 | if (!is_file($this->container->conf->getConfigFileExt()) | ||
47 | && !in_array($next->getName(), ['displayInstall', 'saveInstall'], true) | ||
48 | ) { | ||
49 | return $response->withRedirect($this->container->basePath . '/install'); | ||
50 | } | ||
51 | |||
46 | $this->runUpdates(); | 52 | $this->runUpdates(); |
47 | $this->checkOpenShaarli($request, $response, $next); | 53 | $this->checkOpenShaarli($request, $response, $next); |
48 | 54 | ||