mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
replace database settings with dotenv variant
As we can't refer to the project root dir in the module path, the module path may now also be a relative directory which is then taken as being relative to the project root path. Moves the checkModulePresence() function into the Setup class, so that it can work on the computed absolute module path.
This commit is contained in:
@@ -147,7 +147,7 @@ function repeatWarnings()
|
||||
function runSQLScript($sScript, $bfatal = true, $bVerbose = false, $bIgnoreErrors = false)
|
||||
{
|
||||
// Convert database DSN to psql parameters
|
||||
$aDSNInfo = \Nominatim\DB::parseDSN(CONST_Database_DSN);
|
||||
$aDSNInfo = \Nominatim\DB::parseDSN(getSetting('DATABASE_DSN'));
|
||||
if (!isset($aDSNInfo['port']) || !$aDSNInfo['port']) $aDSNInfo['port'] = 5432;
|
||||
|
||||
$oCmd = new \Nominatim\Shell('psql');
|
||||
|
||||
Reference in New Issue
Block a user