X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/244cb0e98c42375505b00f8d736dc5eabe408db7..15a1666f8a1e19c338015fccd502be6cfd5c24df:/lib/lib.php?ds=sidebyside diff --git a/lib/lib.php b/lib/lib.php index c4fbca30..753159d2 100644 --- a/lib/lib.php +++ b/lib/lib.php @@ -1,5 +1,28 @@ load($sProjectDir.'/.env'); + } + $dotenv->load(CONST_DataDir.'/settings/env.defaults'); +} + +function getSetting($sConfName) +{ + return $_ENV['NOMINATIM_'.$sConfName]; +} + function fail($sError, $sUserError = false) { if (!$sUserError) $sUserError = $sError; @@ -55,7 +78,7 @@ function byImportance($a, $b) if ($a['importance'] != $b['importance']) return ($a['importance'] > $b['importance']?-1:1); - return ($a['foundorder'] < $b['foundorder']?-1:1); + return $a['foundorder'] <=> $b['foundorder']; }