From 8d697f6f4fe796fd0be8a21e5a20236087c0cdbe Mon Sep 17 00:00:00 2001 From: Gregory Letellier Date: Mon, 13 Nov 2023 11:17:42 +0100 Subject: [PATCH] =?UTF-8?q?gestion=20base=20sqlite=20dans=20r=C3=A9pertoir?= =?UTF-8?q?e=20databases?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Core/Kernel/Application.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Core/Kernel/Application.php b/src/Core/Kernel/Application.php index 9d48058..1626cdd 100644 --- a/src/Core/Kernel/Application.php +++ b/src/Core/Kernel/Application.php @@ -66,6 +66,11 @@ class Application $conn["PASSWORD"] = isset($_ENV[$this->getKey("PASSWORD", $key)]) ? $_ENV[$this->getKey("PASSWORD", $key)] : null; $conn["DATABASE"] = isset($_ENV[$this->getKey("DATABASE", $key)]) ? $_ENV[$this->getKey("DATABASE", $key)] : null; $conn["PORT"] = isset($_ENV[$this->getKey("PORT", $key)]) ? $_ENV[$this->getKey("PORT", $key)] : null; + if ($conn["TYPE"] == "sqlite") { + if (!is_file($conn["DATABASE"])) { + $conn["DATABASE"] = ROOT . DS . "databases" . DS . $conn["DATABASE"]; + } + } $ret[$connection] = $conn; } }