X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/06110ba358f5171d48b2003ad24a7e42c755fff4..15a1666f8a1e19c338015fccd502be6cfd5c24df:/lib/DB.php?ds=inline 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)