X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/8c3a0efe8b75a06279998e66a932d8a56c483961..3cdfe066336ad19772d300a85d6c1feaadc074ea:/lib/DB.php diff --git a/lib/DB.php b/lib/DB.php index 38b3e27e..0454a0ff 100644 --- a/lib/DB.php +++ b/lib/DB.php @@ -2,7 +2,7 @@ namespace Nominatim; -require_once(CONST_BasePath.'/lib/DatabaseError.php'); +require_once(CONST_LibDir.'/DatabaseError.php'); /** * Uses PDO to access the database specified in the CONST_Database_DSN @@ -12,9 +12,9 @@ class DB { protected $connection; - public function __construct($sDSN = CONST_Database_DSN) + public function __construct($sDSN = null) { - $this->sDSN = $sDSN; + $this->sDSN = $sDSN ?? getSetting('DATABASE_DSN'); } public function connect($bNew = false, $bPersistent = true)