mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-11-27 10:43:02 +03:00
avoid accessing constants when getting data from env
When a setting can be read from the environment variable, avoid accessing the internal defaults. This way the scripts can be accessed directly in \lib as long as the environment is set up correctly with full defaults.
This commit is contained in:
parent
bc09d7aedb
commit
0847964a27
@ -42,7 +42,10 @@ class SetupFunctions
|
|||||||
$this->iCacheMemory = getCacheMemoryMB();
|
$this->iCacheMemory = getCacheMemoryMB();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->sModulePath = getSetting('DATABASE_MODULE_PATH', CONST_Default_ModulePath);
|
$this->sModulePath = getSetting('DATABASE_MODULE_PATH');
|
||||||
|
if (!$this->sModulePath) {
|
||||||
|
$this->sModulePath = CONST_Default_ModulePath;
|
||||||
|
}
|
||||||
info('module path: ' . $this->sModulePath);
|
info('module path: ' . $this->sModulePath);
|
||||||
|
|
||||||
// parse database string
|
// parse database string
|
||||||
|
@ -17,7 +17,9 @@ function checkInFile($sOSMFile)
|
|||||||
|
|
||||||
function getOsm2pgsqlBinary()
|
function getOsm2pgsqlBinary()
|
||||||
{
|
{
|
||||||
return getSetting('OSM2PGSQL_BINARY', CONST_Default_Osm2pgsql);
|
$sBinary = getSetting('OSM2PGSQL_BINARY');
|
||||||
|
|
||||||
|
return $sBinary ? $sBinary : CONST_Default_Osm2pgsql;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getImportStyle()
|
function getImportStyle()
|
||||||
|
Loading…
Reference in New Issue
Block a user