X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/15a1666f8a1e19c338015fccd502be6cfd5c24df..77e287f66918296b9461470a7846e22ec1f36a08:/lib/setup_functions.php diff --git a/lib/setup_functions.php b/lib/setup_functions.php index 5aa5919b..dc84cf92 100755 --- a/lib/setup_functions.php +++ b/lib/setup_functions.php @@ -14,3 +14,21 @@ function checkInFile($sOSMFile) fail('osm-file "' . $aCMDResult['osm-file'] . '" not readable'); } } + +function getOsm2pgsqlBinary() +{ + $sBinary = getSetting('OSM2PGSQL_BINARY'); + + return $sBinary ? $sBinary : CONST_Default_Osm2pgsql; +} + +function getImportStyle() +{ + $sStyle = getSetting('IMPORT_STYLE'); + + if (in_array($sStyle, array('admin', 'street', 'address', 'full', 'extratags'))) { + return CONST_DataDir.'/settings/import-'.$sStyle.'.style'; + } + + return $sStyle; +}