gestion base sqlite dans répertoire databases

This commit is contained in:
Gregory Letellier
2023-11-13 11:17:42 +01:00
parent 04e2843569
commit 8d697f6f4f

View File

@@ -66,6 +66,11 @@ class Application
$conn["PASSWORD"] = isset($_ENV[$this->getKey("PASSWORD", $key)]) ? $_ENV[$this->getKey("PASSWORD", $key)] : null; $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["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; $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; $ret[$connection] = $conn;
} }
} }