X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/2ab9e4acd3a2ceb5ff871b6b6afc786377e8739f..3cdfe066336ad19772d300a85d6c1feaadc074ea:/lib/DB.php?ds=sidebyside 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)